Testing with now() should not pass in date/time

This commit is contained in:
Matthias 2019-08-25 10:53:56 +02:00
parent 8f8acf5b06
commit e603cca7a5

View File

@ -1604,7 +1604,7 @@ def test_timeframe_to_prev_date():
assert timeframe_to_prev_date(interval, date) == result
date = datetime.now(tz=timezone.utc)
assert timeframe_to_prev_date("5m", date) < date
assert timeframe_to_prev_date("5m") < date
def test_timeframe_to_next_date():
@ -1629,4 +1629,4 @@ def test_timeframe_to_next_date():
assert timeframe_to_next_date(interval, date) == result
date = datetime.now(tz=timezone.utc)
assert timeframe_to_next_date("5m", date) > date
assert timeframe_to_next_date("5m") > date