From a1f850c34169f6145445836573e1d35e776737b9 Mon Sep 17 00:00:00 2001 From: Geoff Taylor Date: Thu, 14 Oct 2021 11:49:07 +0100 Subject: [PATCH] Fixed UTC issue in test. --- tests/test_rootbank.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_rootbank.py b/tests/test_rootbank.py index 8b7f1b2..9d39b0e 100644 --- a/tests/test_rootbank.py +++ b/tests/test_rootbank.py @@ -2,7 +2,7 @@ from .context import mango from .data import load_root_bank from .fakes import fake_account_info, fake_seeded_public_key -from datetime import datetime +from datetime import datetime, timezone from decimal import Decimal from solana.publickey import PublicKey @@ -75,4 +75,4 @@ def test_root_bank_loaded(): # Typescript says: 1000219.00867863010088498754 assert actual.borrow_index == Decimal("1000219.00867863010088498754157626536") # Typescript says: "Mon, 04 Oct 2021 14:58:05 GMT" - assert actual.last_updated == datetime(2021, 10, 4, 15, 58, 5) + assert actual.last_updated.astimezone(timezone.utc) == datetime(2021, 10, 4, 15, 58, 5).astimezone(timezone.utc)