From 02d42e22ef58c79ff1b40b59192feeebfb9d120b Mon Sep 17 00:00:00 2001 From: chloend Date: Thu, 17 Oct 2024 12:06:42 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20d'un=20user=20suppl=C3=A9mentaire=20dan?= =?UTF-8?q?s=20le=20cadre=20d'autres=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lemarche/api/tenders/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lemarche/api/tenders/tests.py b/lemarche/api/tenders/tests.py index 87105407d..52a8ecd16 100644 --- a/lemarche/api/tenders/tests.py +++ b/lemarche/api/tenders/tests.py @@ -88,7 +88,7 @@ def test_user_with_valid_api_key_can_create_tender(self): self.assertEqual(response.status_code, 201) self.assertIn("slug", response.data.keys()) tender = Tender.objects.get(title="Test author 1") - self.assertEqual(User.objects.count(), 2 + 1) # created a new user + self.assertEqual(User.objects.count(), 3 + 1) # created a new user self.assertEqual(tender.author.email, USER_CONTACT_EMAIL) self.assertEqual(tender.status, tender_constants.STATUS_PUBLISHED) self.assertEqual(tender.source, tender_constants.SOURCE_API) @@ -102,7 +102,7 @@ def test_user_with_valid_api_key_can_create_tender(self): self.assertEqual(response.status_code, 201) self.assertIn("slug", response.data.keys()) tender = Tender.objects.get(title="Test author 2") - self.assertEqual(User.objects.count(), 3) # did not create a new user + self.assertEqual(User.objects.count(), 4) # did not create a new user self.assertEqual(tender.author, self.user_with_token) self.assertEqual(tender.status, tender_constants.STATUS_PUBLISHED) self.assertEqual(tender.source, tender_constants.SOURCE_API)