Revert "Replace datetime.utcnow with datetime.now(timezone.utc)"

This reverts commit c4ac876183.
This commit is contained in:
Sam Germain
2021-09-29 22:27:21 -06:00
parent 993dc672b4
commit af6afd0ac2
8 changed files with 32 additions and 34 deletions

View File

@@ -37,10 +37,10 @@ def test_strategy_test_v2(result, fee):
assert strategy.confirm_trade_entry(pair='ETH/BTC', order_type='limit', amount=0.1,
rate=20000, time_in_force='gtc',
current_time=datetime.now(timezone.utc)(), side='long') is True
current_time=datetime.utcnow(), side='long') is True
assert strategy.confirm_trade_exit(pair='ETH/BTC', trade=trade, order_type='limit', amount=0.1,
rate=20000, time_in_force='gtc', sell_reason='roi',
current_time=datetime.now(timezone.utc)()) is True
current_time=datetime.utcnow()) is True
# TODO-lev: Test for shorts?
assert strategy.custom_stoploss(pair='ETH/BTC', trade=trade, current_time=datetime.now(),