Use Python 3.7 compatible pickle protocol

This commit is contained in:
Darren Burns
2022-04-07 09:46:14 +01:00
parent 8ff74e23ae
commit 2f0207f7df
3 changed files with 10 additions and 11 deletions

View File

@@ -51,8 +51,8 @@ def test_log_message_render(console):
# Since we can't guarantee the timezone the tests will run in...
local_time = (
datetime.fromtimestamp(TIMESTAMP)
.replace(tzinfo=timezone.utc)
.astimezone(tz=tz.tzlocal())
.replace(tzinfo=timezone.utc)
.astimezone(tz=tz.tzlocal())
)
timezone_name = local_time.tzname()
string_timestamp = local_time.time()

View File

@@ -31,14 +31,13 @@ async def test_devtools_log_places_encodes_and_queues_message(devtools):
queued_log = await devtools.log_queue.get()
queued_log_json = json.loads(queued_log)
assert queued_log_json == {
"payload": {
"encoded_segments": "gASVQgAAAAAAAABdlCiMDHJpY2guc2VnbWVudJSMB1NlZ"
"21lbnSUk5SMDUhlbGxvLCB3b3JsZCGUTk6HlIGUaAOMAQqUTk6HlIGUZS4=",
"line_number": 0,
"path": "",
"timestamp": TIMESTAMP,
},
"type": "client_log",
"payload": {
"timestamp": TIMESTAMP,
"path": "",
"line_number": 0,
"encoded_segments": "gANdcQAoY3JpY2guc2VnbWVudApTZWdtZW50CnEBWA0AAABIZWxsbywgd29ybGQhcQJOTodxA4FxBGgBWAEAAAAKcQVOTodxBoFxB2Uu",
},
}
@@ -54,7 +53,7 @@ async def test_devtools_log_places_encodes_and_queues_many_logs_as_string(devtoo
"timestamp": TIMESTAMP,
"path": "",
"line_number": 0,
"encoded_segments": "gASVQAAAAAAAAABdlCiMDHJpY2guc2VnbWVudJSMB1NlZ21lbnSUk5SMC2hlbGxvIHdvcmxklE5Oh5SBlGgDjAEKlE5Oh5SBlGUu",
"encoded_segments": "gANdcQAoY3JpY2guc2VnbWVudApTZWdtZW50CnEBWAsAAABoZWxsbyB3b3JsZHECTk6HcQOBcQRoAVgBAAAACnEFTk6HcQaBcQdlLg==",
},
}