Skip to content

Commit

Permalink
Fix db sequence are not always predictable
Browse files Browse the repository at this point in the history
  • Loading branch information
Guilouf committed Jan 2, 2025
1 parent 8ce9c81 commit 622980d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lemarche/api/datacube/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ def test_list_tenders_content(self):
self.assertEqual(response.status_code, 200)
self.assertEqual(response.json(), {"count": 0, "next": None, "previous": None, "results": []})

user = UserFactory(kind=User.KIND_BUYER)
user = UserFactory(kind=User.KIND_BUYER, email="[email protected]")
CompanyFactory(name="Lagarde et Fils", users=[user])
TenderFactory(title="Sébastien Le Lopez", amount="0-42K", author=user, presta_type=["FANFAN", "LA", "TULIPE"])

# no associated company
TenderFactory(title="Marc Henry", amount_exact=697)
TenderFactory(title="Marc Henry", amount_exact=697, author__email="[email protected]")

response = self.client.get(url, headers={"Authorization": "Token bar"})
self.assertEqual(response.status_code, 200)
Expand All @@ -65,7 +65,7 @@ def test_list_tenders_content(self):
{
"amount": "0-42K",
"amount_exact": None,
"author_email": "email1@example.com",
"author_email": "lagarde@example.com",
"company_name": "Lagarde et Fils",
"company_slug": "lagarde-et-fils",
"created_at": "2024-06-21T14:23:34+02:00",
Expand All @@ -80,7 +80,7 @@ def test_list_tenders_content(self):
{
"amount": None,
"amount_exact": 697,
"author_email": "email2@example.com",
"author_email": "henry@example.com",
"created_at": "2024-06-21T14:23:34+02:00",
"kind": "QUOTE",
"presta_type": [],
Expand Down

0 comments on commit 622980d

Please sign in to comment.