python-jsonrpc-server
python-jsonrpc-server copied to clipboard
Test test_writer_bad_message fails when not in UTC timezone
The test_writer_bad_message fails when running in a timezone other than UTC, as the timestamp() method presumes that it is local time unless a timezone is specified, and so the assert (which has assumed UTC) fails. This patch fixes this issue.
--- a/test/test_streams.py
+++ b/test/test_streams.py
@@ -119,6 +119,7 @@
hour=1,
minute=1,
second=1,
+ tzinfo=datetime.timezone.utc,
))
assert wfile.getvalue() in [