From 4d3fefbeacb0b2d023408b712c8b8d13b51e3023 Mon Sep 17 00:00:00 2001 From: Arnaud-D <35631001+Arnaud-D@users.noreply.github.com> Date: Sat, 14 Oct 2023 18:37:30 +0200 Subject: [PATCH] =?UTF-8?q?Modifie=20l'utilisation=20d'assertQuerysetEqual?= =?UTF-8?q?=20dans=20un=20test=20(pr=C3=A9paration=20pour=20Django=204)=20?= =?UTF-8?q?(#6542)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * retire la comparaison avec une liste de repr() (retiré dans Django 4.1) * remplace par une comparaison directe avec un Queryset (ajouté dans Django 3.2) --- zds/mp/tests/tests_views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zds/mp/tests/tests_views.py b/zds/mp/tests/tests_views.py index ea1f824246..85b0eed8cf 100644 --- a/zds/mp/tests/tests_views.py +++ b/zds/mp/tests/tests_views.py @@ -950,4 +950,4 @@ def test_no_interference(self): self.client.force_login(self.participant.user) self.client.get(reverse("mp:mark-post-unread", kwargs={"pk": self.post2.pk}), follow=True) topic_read_new = PrivateTopicRead.objects.filter(privatetopic=self.topic1, user=self.author.user) - self.assertQuerysetEqual(topic_read_old, [repr(t) for t in topic_read_new]) + self.assertQuerysetEqual(topic_read_old, topic_read_new)