Skip to content

Commit

Permalink
Modify alumni backend tests
Browse files Browse the repository at this point in the history
  • Loading branch information
julianweng committed Oct 11, 2024
1 parent cdb599b commit de6e368
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backend/tests/clubs/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2643,7 +2643,7 @@ def test_user_profile(self):

def test_alumni_page(self):
"""
Ensure alumni page can be seen, even for users who are not logged in.
Ensure alumni page can be seen
"""
now = timezone.now()
for i, user in enumerate([self.user1, self.user2, self.user3]):
Expand All @@ -2656,6 +2656,10 @@ def test_alumni_page(self):

# fetch alumni page
resp = self.client.get(reverse("clubs-alumni", args=(self.club1.code,)))
self.assertIn(resp.status_code, [403], resp.content)

self.client.login(username=self.user4.username, password="test")
resp = self.client.get(reverse("clubs-alumni", args=(self.club1.code,)))
self.assertIn(resp.status_code, [200], resp.content)
data = resp.json()

Expand Down

0 comments on commit de6e368

Please sign in to comment.