Fix small typo and add small testcase

This commit is contained in:
Matthias 2020-09-06 15:05:47 +02:00
parent 7c1f111ddf
commit b4da36d6e9
2 changed files with 3 additions and 1 deletions

View File

@ -1376,7 +1376,7 @@ class FreqtradeBot:
""" """
if not order_id: if not order_id:
logger.warning(f'Orderid for trade {trade} is empty.') logger.warning(f'Orderid for trade {trade} is empty.')
False return False
# Update trade with order values # Update trade with order values
logger.info('Found open order for %s', trade) logger.info('Found open order for %s', trade)

View File

@ -1737,6 +1737,8 @@ def test_update_trade_state(mocker, default_conf, limit_buy_order, caplog) -> No
open_date=arrow.utcnow().datetime, open_date=arrow.utcnow().datetime,
amount=11, amount=11,
) )
assert not freqtrade.update_trade_state(trade, None)
assert log_has_re(r'Orderid for trade .* is empty.', caplog)
# Add datetime explicitly since sqlalchemy defaults apply only once written to database # Add datetime explicitly since sqlalchemy defaults apply only once written to database
freqtrade.update_trade_state(trade, '123') freqtrade.update_trade_state(trade, '123')
# Test amount not modified by fee-logic # Test amount not modified by fee-logic