mirror of https://github.com/zulip/zulip.git
test_events: Convert tuples to arrays for OpenAPI testing.
Use `ujson.loads(ujson.dumps())` wrapper on events sent for OpenAPI testing so that all tuples are converted into arrays as tuples aren't valid in JSON.
This commit is contained in:
parent
f26d0affef
commit
d036a01516
|
@ -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'
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue