Make events tests deterministic

This commit is contained in:
Martin Pépin 2019-12-22 23:08:27 +01:00
parent d5e9d09044
commit e0fd3db638
2 changed files with 11 additions and 8 deletions

View file

@ -129,7 +129,13 @@ class CSVExportContentTest(MessagePatch, TestCase):
participants = self.client.get(self.url).content.decode("utf-8")
participants = list(csv.reader(participants.split("\n")))
toto_registration = participants[1]
# This is not super nice, but it makes the test deterministic.
if toto_registration[5] == "f & d":
toto_registration[5] = "d & f"
self.assertEqual(
["toto_foo", "toto@a.b", "toto", "foo", "a", "d & f", "hello"],
participants[1],
toto_registration,
)