Manually fix up code after 2to3
This commit is contained in:
Родитель
9a1b943497
Коммит
96f9a4de0f
|
@ -482,7 +482,7 @@ def get_dates_metrics(prefix, channel):
|
|||
elif kind == "flag":
|
||||
labels = [0, 1]
|
||||
else:
|
||||
labels = list(definition.get_value().keys()).tolist()
|
||||
labels = list(definition.get_value().keys())
|
||||
|
||||
altered_dimensions = deepcopy(dimensions)
|
||||
if 'child' in dimensions:
|
||||
|
|
|
@ -63,7 +63,7 @@ class ServiceTestCase(unittest.TestCase):
|
|||
def test_status(self):
|
||||
resp = self.app.get('/status')
|
||||
self.assertEqual(resp.status_code, 200)
|
||||
self.assertEqual(resp.data, 'OK')
|
||||
self.assertEqual(resp.data.decode(), 'OK')
|
||||
|
||||
def test_submission_dates_cache_control(self):
|
||||
resp = self.app.get(
|
||||
|
|
|
@ -22,7 +22,7 @@ def format_payload_bytes_decoded(ping):
|
|||
"submission_timestamp": datetime.strptime(
|
||||
ping["meta"]["submissionDate"], "%Y%m%d"
|
||||
).strftime("%Y-%m-%d %H:%M:%S"),
|
||||
"payload": base64.b64encode(zlib.compress(json.dumps(ping))),
|
||||
"payload": base64.b64encode(zlib.compress(json.dumps(ping).encode())).decode(),
|
||||
}
|
||||
|
||||
|
||||
|
@ -44,7 +44,7 @@ def format_payload_bytes_decoded_mobile(ping):
|
|||
"app_name": ping["meta"]["appName"],
|
||||
}
|
||||
},
|
||||
"payload": base64.b64encode(zlib.compress(json.dumps(ping))),
|
||||
"payload": base64.b64encode(zlib.compress(json.dumps(ping).encode())).decode(),
|
||||
}
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче