Testing with now() should not pass in date/time
This commit is contained in:
parent
8f8acf5b06
commit
e603cca7a5
@ -1604,7 +1604,7 @@ def test_timeframe_to_prev_date():
|
|||||||
assert timeframe_to_prev_date(interval, date) == result
|
assert timeframe_to_prev_date(interval, date) == result
|
||||||
|
|
||||||
date = datetime.now(tz=timezone.utc)
|
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():
|
def test_timeframe_to_next_date():
|
||||||
@ -1629,4 +1629,4 @@ def test_timeframe_to_next_date():
|
|||||||
assert timeframe_to_next_date(interval, date) == result
|
assert timeframe_to_next_date(interval, date) == result
|
||||||
|
|
||||||
date = datetime.now(tz=timezone.utc)
|
date = datetime.now(tz=timezone.utc)
|
||||||
assert timeframe_to_next_date("5m", date) > date
|
assert timeframe_to_next_date("5m") > date
|
||||||
|
Loading…
Reference in New Issue
Block a user