diff options
author | Alex Grönholm <alex.gronholm@nextday.fi> | 2022-02-09 23:50:47 +0200 |
---|---|---|
committer | Alex Grönholm <alex.gronholm@nextday.fi> | 2022-02-10 00:04:14 +0200 |
commit | 20808b11414c5d7621c88b394196c82770a7e3d4 (patch) | |
tree | ca92c25f4030f080af2234aec4cf0997e54ab0c2 /tests | |
parent | 13420163f1ebcd6253f4134660c44d5f1b0fc312 (diff) | |
download | apscheduler-20808b11414c5d7621c88b394196c82770a7e3d4.tar.gz |
Use the standard tzinfo tzname() method instead of the pytz attribute
This avoids one of the deprecation warnings.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_util.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_util.py b/tests/test_util.py index 7cadbc2..ab10f50 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -98,7 +98,7 @@ class TestAstimezone(object): assert 'Only timezones from the pytz library are supported' in str(exc.value) def test_bad_local_timezone(self): - zone = Mock(tzinfo, localize=None, normalize=None, zone='local') + zone = Mock(tzinfo, localize=None, normalize=None, tzname=lambda dt: 'local') exc = pytest.raises(ValueError, astimezone, zone) assert 'Unable to determine the name of the local timezone' in str(exc.value) |