Skip to content

Commit

Permalink
Modifie l'utilisation d'assertQuerysetEqual dans un test (préparation…
Browse files Browse the repository at this point in the history
… pour Django 4)

* 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)
  • Loading branch information
Arnaud-D committed Oct 14, 2023
1 parent f547a2f commit e228505
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zds/mp/tests/tests_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit e228505

Please sign in to comment.