From 50266f2466d72cd175e771c8a3ddd1754c3e15cd Mon Sep 17 00:00:00 2001 From: Ludovic Stephan Date: Mon, 11 May 2020 12:44:14 +0200 Subject: [PATCH] Fix tests for python3.7 (?) --- events/tests/test_views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/events/tests/test_views.py b/events/tests/test_views.py index 1ccd3530..7e9b0c77 100644 --- a/events/tests/test_views.py +++ b/events/tests/test_views.py @@ -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", }, )