Skip to content

Commit

Permalink
Ajout d'un user supplémentaire dans le cadre d'autres tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chloend committed Oct 24, 2024
1 parent 5dddd25 commit 79327ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lemarche/api/tenders/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 79327ea

Please sign in to comment.