Commit mock-trades to avoid errors in tests
This commit is contained in:
parent
de5657a91b
commit
7f1080368b
@ -226,6 +226,7 @@ def create_mock_trades(fee, use_db: bool = True):
|
|||||||
add_trade(trade)
|
add_trade(trade)
|
||||||
|
|
||||||
if use_db:
|
if use_db:
|
||||||
|
Trade.commit()
|
||||||
Trade.query.session.flush()
|
Trade.query.session.flush()
|
||||||
|
|
||||||
|
|
||||||
@ -259,6 +260,7 @@ def create_mock_trades_usdt(fee, use_db: bool = True):
|
|||||||
add_trade(trade)
|
add_trade(trade)
|
||||||
|
|
||||||
if use_db:
|
if use_db:
|
||||||
|
Trade.commit()
|
||||||
Trade.query.session.flush()
|
Trade.query.session.flush()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user