Ignore list items order in test x2

This commit is contained in:
Christopher C. Wells 2022-06-28 07:09:34 -07:00
parent 406a4edf82
commit 3a022f8b12
1 changed files with 1 additions and 1 deletions

View File

@ -631,7 +631,7 @@ class TagsAPITestCase(TestBase.BabyBuddyAPITestCaseBase):
data = {"child": 1, "note": "New tagged note.", "tags": ["tag1", "tag2"]}
response = self.client.post(reverse("api:note-list"), data, format="json")
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
self.assertEqual(response.data["tags"], data["tags"])
self.assertCountEqual(response.data["tags"], data["tags"])
note = models.Note.objects.get(pk=response.data["id"])
self.assertCountEqual(list(note.tags.names()), data["tags"])