Closed
Description
The flaky test was introduced in #298
The issue is that the code which constructs the expected payload for the request is flaky given Python's hash randomization:
blob_data = b'{"name": "blob-name"}\r\n'
if metadata:
blob_data = (
b'{"name": "blob-name", "metadata": '
+ json.dumps(metadata).encode("utf-8")
+ b"}\r\n"
)
self.assertEqual(blob._changes, set(["metadata"]))
payload = (
b"--==0==\r\n"
+ b"content-type: application/json; charset=UTF-8\r\n\r\n"
+ b'{"name": "blob-name"}\r\n'
+ blob_data
+ b"--==0==\r\n"
+ b"content-type: application/xml\r\n\r\n"
+ data_read