Commit 7d32ae95 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Jérome Perrin

py3: etree.fromstring requires bytes input or XML fragments without declaration

parent 72cf3384
...@@ -333,7 +333,7 @@ return printed ...@@ -333,7 +333,7 @@ return printed
# Test xml serialisation of form. # Test xml serialisation of form.
xml_string = formToXML(form) xml_string = formToXML(form)
xml_tree = etree.fromstring(xml_string) xml_tree = etree.fromstring(xml_string.encode())
field_node = xml_tree.find('groups/group/fields/field') field_node = xml_tree.find('groups/group/fields/field')
self.assertEqual(field_node.find('type').text, 'ProxyField') self.assertEqual(field_node.find('type').text, 'ProxyField')
self.assertTrue(field_node.find('delegated_list/title') is not None) self.assertTrue(field_node.find('delegated_list/title') is not None)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment