Gracefully handle problems with dry-run orders

This commit is contained in:
Matthias
2019-08-18 19:38:23 +02:00
parent 9005447590
commit a4ede02ced
2 changed files with 10 additions and 2 deletions

View File

@@ -1328,6 +1328,9 @@ def test_get_order(default_conf, mocker, exchange_name):
print(exchange.get_order('X', 'TKN/BTC'))
assert exchange.get_order('X', 'TKN/BTC').myid == 123
with pytest.raises(InvalidOrderException, match=r'Tried to get an invalid dry-run-order.*'):
exchange.get_order('Y', 'TKN/BTC')
default_conf['dry_run'] = False
api_mock = MagicMock()
api_mock.fetch_order = MagicMock(return_value=456)