File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 77# pylint: disable=redefined-outer-name,missing-docstring
88
99import json
10- from datetime import datetime , timedelta
10+ from datetime import datetime , timedelta , timezone
1111from pathlib import Path
1212
1313import pytest
@@ -254,7 +254,7 @@ def test_json_loader_with_expired_cache(
254254
255255 # Fast-forward the time to the future by a day and a few seconds beyond
256256 # when the cache is valid, which will force a fresh fetch of data.
257- with freeze_time (datetime .utcnow ( ) + timedelta (days = 1 , seconds = 5 )):
257+ with freeze_time (datetime .now ( timezone . utc ) + timedelta (days = 1 , seconds = 5 )):
258258 acctload .JSONAccountLoader ("http://example.com/acct.json" , max_age = 86400 )
259259
260260 # requests.get should be called when cache is expired to refresh it
@@ -285,7 +285,7 @@ def test_yaml_loader_with_expired_cache(
285285
286286 # Fast-forward the time to the future by a day and a few seconds beyond
287287 # when the cache is valid, which will force a fresh fetch of data.
288- with freeze_time (datetime .utcnow ( ) + timedelta (days = 1 , seconds = 5 )):
288+ with freeze_time (datetime .now ( timezone . utc ) + timedelta (days = 1 , seconds = 5 )):
289289 acctload .YAMLAccountLoader ("http://example.com/acct.yaml" , max_age = 86400 )
290290
291291 # requests.get should be called when cache is expired to refresh it
You can’t perform that action at this time.
0 commit comments