From 886195b91a615ec82abf304d7395709005461104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20L=C3=B6ffler?= Date: Wed, 22 May 2024 09:03:33 +0300 Subject: [PATCH] Fix py3.12 datetime deprecation warning --- tests/integration/test_stream.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/test_stream.py b/tests/integration/test_stream.py index aa311b2..8245442 100644 --- a/tests/integration/test_stream.py +++ b/tests/integration/test_stream.py @@ -150,7 +150,7 @@ def test_stream_reader(session, iterations=15): assert all(isinstance(key, str) for key in market_definitions) assert all(isinstance(md, MarketDefinition) for md in market_definitions.values()) - now = datetime.datetime.utcnow().astimezone(datetime.timezone.utc) + now = datetime.datetime.now(datetime.timezone.utc) order_book = sr.caches[MARKET_STREAM_ID].order_book # type: ignore[union-attr] assert len(order_book) == len(market_definitions) assert all(isinstance(key, str) for key in order_book)