Fix tests for python3.7 (?)

This commit is contained in:
Ludovic Stephan 2020-05-11 12:44:14 +02:00
parent 65171d1276
commit 50266f2466

View file

@ -142,10 +142,10 @@ class CSVExportContentTest(MessagePatch, CSVResponseMixin, TestCase):
response = self.client.get(self.url)
content = self.load_from_csv_response(response, as_dict=True)
toto_dict = content[0]
toto_dict = dict(content[0])
# This is not super nice, but it makes the test deterministic.
toto_dict["def"] = [x.strip() for x in toto_dict["def"].split("&")]
toto_dict["def"] = set(x.strip() for x in toto_dict["def"].split("&"))
self.assertDictEqual(
toto_dict,
@ -155,7 +155,7 @@ class CSVExportContentTest(MessagePatch, CSVResponseMixin, TestCase):
"nom de famille": "foo",
"email": "toto@a.b",
"abc": "a",
"def": ["d", "f"],
"def": {"d", "f"},
"remarks": "hello",
},
)