Skip to content

Commit

Permalink
test: fix decoder timezones
Browse files Browse the repository at this point in the history
  • Loading branch information
rostyq committed Mar 5, 2024
1 parent 7efc956 commit f2f67fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_decoder.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from pytest import fixture
from typing import TYPE_CHECKING
from datetime import datetime
from datetime import datetime, UTC
from ipaddress import IPv4Address

from liqpy.api import Decoder
Expand All @@ -20,8 +20,8 @@ def test_decode_status_example(decoder: Decoder):
with open(EXAMPLES_DIR / "status.json", "r") as fp:
o: "LiqpayCallbackDict" = decoder.decode(fp.read())

assert o["create_date"] == datetime(2017, 8, 3, 13, 55, 16, 373000)
assert o["end_date"] == datetime(2017, 8, 3, 13, 55, 29, 972000)
assert o["create_date"] == datetime(2017, 8, 3, 10, 55, 16, 373000, tzinfo=UTC)
assert o["end_date"] == datetime(2017, 8, 3, 10, 55, 29, 972000, tzinfo=UTC)
assert o["ip"] == IPv4Address("8.8.8.8")

assert isinstance(o["version"], int)
Expand Down

0 comments on commit f2f67fa

Please sign in to comment.