From 9ca588c78058f8b9d6d1db4a5f0677f396a10263 Mon Sep 17 00:00:00 2001 From: Sam Germain Date: Mon, 5 Jul 2021 22:01:46 -0600 Subject: [PATCH] test_update_market_order for shorts passes --- tests/{ => persistence}/test_persistence.py | 0 tests/{ => persistence}/test_persistence_leverage.py | 0 tests/{ => persistence}/test_persistence_short.py | 9 ++++----- 3 files changed, 4 insertions(+), 5 deletions(-) rename tests/{ => persistence}/test_persistence.py (100%) rename tests/{ => persistence}/test_persistence_leverage.py (100%) rename tests/{ => persistence}/test_persistence_short.py (99%) diff --git a/tests/test_persistence.py b/tests/persistence/test_persistence.py similarity index 100% rename from tests/test_persistence.py rename to tests/persistence/test_persistence.py diff --git a/tests/test_persistence_leverage.py b/tests/persistence/test_persistence_leverage.py similarity index 100% rename from tests/test_persistence_leverage.py rename to tests/persistence/test_persistence_leverage.py diff --git a/tests/test_persistence_short.py b/tests/persistence/test_persistence_short.py similarity index 99% rename from tests/test_persistence_short.py rename to tests/persistence/test_persistence_short.py index 1f39f7439..ed01865a3 100644 --- a/tests/test_persistence_short.py +++ b/tests/persistence/test_persistence_short.py @@ -506,7 +506,6 @@ def test_update_market_order( assert trade.close_profit is None assert trade.close_date is None assert trade.interest_rate == 0.0005 - # TODO: Uncomment the next assert and make it work. # The logger also has the exact same but there's some spacing in there assert log_has_re(r"MARKET_SELL has been fulfilled for Trade\(id=1, " r"pair=ETH/BTC, amount=275.97543219, open_rate=0.00004173, open_since=.*\).", @@ -519,11 +518,11 @@ def test_update_market_order( assert trade.close_rate == 0.00004099 assert trade.close_profit == 0.03685505 assert trade.close_date is not None - # TODO: The amount should maybe be the opening amount + the interest - # TODO: Uncomment the next assert and make it work. + # TODO-mg: The amount should maybe be the opening amount + the interest + # TODO-mg: Uncomment the next assert and make it work. # The logger also has the exact same but there's some spacing in there - assert log_has_re(r"MARKET_SELL has been fulfilled for Trade\(id=1, " - r"pair=ETH/BTC, amount=275.97543219, open_rate=0.00004099, open_since=.*\).", + assert log_has_re(r"MARKET_BUY has been fulfilled for Trade\(id=1, " + r"pair=ETH/BTC, amount=275.97543219, open_rate=0.00004173, open_since=.*\).", caplog)