Skip to content
Snippets Groups Projects
Commit a3d39eae authored by Feanil Patel's avatar Feanil Patel
Browse files

JSON takes unicode as input.

In python2 there would be some auto coercion done so that the orginal
code here works but that's not the case in python 3.
parent f8129721
No related branches found
No related tags found
No related merge requests found
......@@ -166,10 +166,7 @@ class XBlockContainerFixture(StudioApiFixture):
"""
Encode `post_dict` (a dictionary) as UTF-8 encoded JSON.
"""
return json.dumps({
k: v.encode('utf-8') if isinstance(v, six.string_types) else v
for k, v in post_dict.items()
})
return json.dumps(post_dict).encode('utf-8')
def get_nested_xblocks(self, category=None):
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment