File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 7
7
# pylint: disable=redefined-outer-name,missing-docstring
8
8
9
9
import json
10
- from datetime import datetime , timedelta
10
+ from datetime import datetime , timedelta , timezone
11
11
from pathlib import Path
12
12
13
13
import pytest
@@ -254,7 +254,7 @@ def test_json_loader_with_expired_cache(
254
254
255
255
# Fast-forward the time to the future by a day and a few seconds beyond
256
256
# 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 )):
258
258
acctload .JSONAccountLoader ("http://example.com/acct.json" , max_age = 86400 )
259
259
260
260
# requests.get should be called when cache is expired to refresh it
@@ -285,7 +285,7 @@ def test_yaml_loader_with_expired_cache(
285
285
286
286
# Fast-forward the time to the future by a day and a few seconds beyond
287
287
# 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 )):
289
289
acctload .YAMLAccountLoader ("http://example.com/acct.yaml" , max_age = 86400 )
290
290
291
291
# requests.get should be called when cache is expired to refresh it
You can’t perform that action at this time.
0 commit comments