From 90ff5f017028fb1010eceb626bdfe13a448e7ed6 Mon Sep 17 00:00:00 2001 From: obdulia Date: Mon, 21 Oct 2019 13:07:35 +0200 Subject: [PATCH] test(odk): compare dicts --- .../aether/odk/api/tests/test_xform_utils.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/aether-odk-module/aether/odk/api/tests/test_xform_utils.py b/aether-odk-module/aether/odk/api/tests/test_xform_utils.py index 823d87b21..d03e19166 100644 --- a/aether-odk-module/aether/odk/api/tests/test_xform_utils.py +++ b/aether-odk-module/aether/odk/api/tests/test_xform_utils.py @@ -278,9 +278,9 @@ def test__parse_xform_file(self): with open(self.samples['xform']['file-xml'], 'rb') as fp: xml_content = parse_xform_file('xform.xml', fp) - self.assertEqual( - json.dumps(parse_xml_to_dict(xls_content), sort_keys=True), - json.dumps(parse_xml_to_dict(xml_content), sort_keys=True), + self.assertDictEqual( + parse_xml_to_dict(xls_content), + parse_xml_to_dict(xml_content), 'The XLS form and the XML form should define both the same form' ) @@ -682,10 +682,7 @@ def test__parse_xform_to_avro_schema__with_multilanguage(self): ) # the same fields - self.assertEqual( - json.dumps(schema['fields'], sort_keys=True), - json.dumps(schema_i18n['fields'], sort_keys=True) - ) + self.assertDictEqual(schema['fields'], schema_i18n['fields']) def test__parse_xform_to_avro_schema__nested_repeats(self): xml_definition = '''