Skip to content

Commit

Permalink
fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentporte committed Nov 25, 2024
1 parent 3cf6d39 commit 0b86ac1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lacommunaute/partner/tests/tests_partner_listview.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pytest
from django.urls import reverse
from factory import Iterator

from lacommunaute.partner.factories import PartnerFactory
from lacommunaute.users.factories import UserFactory
Expand All @@ -21,7 +22,8 @@ def test_listview(client, db, snapshot, url):


def test_pagination(client, db, snapshot, url):
PartnerFactory.create_batch(8 * 3 + 1)
num_of_partners = 8 * 3 + 1
PartnerFactory.create_batch(num_of_partners, name=Iterator([f"Partner {i}" for i in range(num_of_partners)]))
response = client.get(url)
assert response.status_code == 200
assert str(parse_response_to_soup(response, selector="ul.pagination")) == snapshot(name="partner_pagination")
Expand Down

0 comments on commit 0b86ac1

Please sign in to comment.