mirror of
https://github.com/ae-utbm/sith.git
synced 2026-03-22 03:25:05 +00:00
add tests
This commit is contained in:
@@ -59,6 +59,14 @@ class TestClubSearch(TestCase):
|
||||
ids = {d["id"] for d in response.json()["results"]}
|
||||
assert ids == {c.id for c in [self.clubs[0], self.clubs[1], self.clubs[3]]}
|
||||
|
||||
def test_club_search_profile(self):
|
||||
self.client.force_login(self.user)
|
||||
url = reverse("api:search_club_profile")
|
||||
response = self.client.get(url, {"search": "AE"})
|
||||
assert response.status_code == 200
|
||||
ids = {d["id"] for d in response.json()["results"]}
|
||||
assert ids == {c.id for c in [self.clubs[0], self.clubs[1], self.clubs[3]]}
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
class TestFetchClub:
|
||||
|
||||
Reference in New Issue
Block a user