Merge pull request #21671 from edx/feanil/more_bokchoy_fixes
Feanil/more bokchoy fixes
This commit is contained in:
@@ -102,7 +102,7 @@ class ResponseXMLFactory(six.with_metaclass(ABCMeta, object)):
|
||||
explanation_div.set("class", "detailed-solution")
|
||||
explanation_div.text = explanation_text
|
||||
|
||||
return etree.tostring(root)
|
||||
return etree.tostring(root).decode('utf-8')
|
||||
|
||||
@staticmethod
|
||||
def textline_input_xml(**kwargs):
|
||||
|
||||
@@ -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):
|
||||
"""
|
||||
|
||||
@@ -189,7 +189,7 @@ def generate_password(length=12, chars=string.ascii_letters + string.digits):
|
||||
|
||||
password = ''
|
||||
password += choice(string.digits)
|
||||
password += choice(string.letters)
|
||||
password += choice(string.ascii_letters)
|
||||
password += ''.join([choice(chars) for _i in range(length - 2)])
|
||||
return password
|
||||
|
||||
|
||||
Reference in New Issue
Block a user