Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

test_events: Convert tuples to arrays for OpenAPI testing.

orientord036a015164f
diff --git a/zerver/tests/test_events.py b/zerver/tests/test_events.py
index 120ce44af02..3d33033c520 100644
--- a/zerver/tests/test_events.py
+++ b/zerver/tests/test_events.py
@@ -222,7 +222,9 @@ class BaseAction(ZulipTestCase):
events = client.event_queue.contents()
content = {
'queue_id': '123.12',
- 'events': copy.deepcopy(events),
+ # The ujson wrapper helps in converting tuples to lists
+ # as tuples aren't valid JSON structure.
+ 'events': ujson.loads(ujson.dumps(copy.deepcopy(events))),
'msg': '',
'result': 'success'
}