Update some db types

This commit is contained in:
Matthias
2023-02-19 20:18:46 +01:00
parent 101d9ab87f
commit 0691bbaad9
3 changed files with 3 additions and 2 deletions

View File

@@ -21,7 +21,7 @@ spot, margin, futures = TradingMode.SPOT, TradingMode.MARGIN, TradingMode.FUTURE
def test_init_create_session(default_conf):
# Check if init create a session
init_db(default_conf['db_url'])
assert hasattr(Trade, '_session')
assert hasattr(Trade, 'session')
assert 'scoped_session' in type(Trade.session).__name__

View File

@@ -2440,6 +2440,7 @@ def test_select_filled_orders(fee):
def test_order_to_ccxt(limit_buy_order_open):
order = Order.parse_from_ccxt_object(limit_buy_order_open, 'mocked', 'buy')
order.ft_trade_id = 1
order.query.session.add(order)
Order.query.session.commit()