mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 06:03:20 +00:00
Fix club test
This commit is contained in:
parent
27805640a1
commit
b388b96da8
@ -36,14 +36,14 @@ class ClubTest(TestCase):
|
|||||||
self.client.login(username='root', password='plop')
|
self.client.login(username='root', password='plop')
|
||||||
self.client.post(reverse("club:club_members", kwargs={"club_id":4}), {"user": 2, "role": 10})
|
self.client.post(reverse("club:club_members", kwargs={"club_id":4}), {"user": 2, "role": 10})
|
||||||
self.client.login(username='skia', password='plop')
|
self.client.login(username='skia', password='plop')
|
||||||
self.client.post(reverse("club:club_members", kwargs={"club_id":4}), {"user": 4, "role": 9})
|
self.client.post(reverse("club:club_members", kwargs={"club_id":4}), {"user": 7, "role": 9})
|
||||||
response = self.client.get(reverse("club:club_members", kwargs={"club_id":4}))
|
response = self.client.get(reverse("club:club_members", kwargs={"club_id":4}))
|
||||||
self.assertTrue(response.status_code == 200)
|
self.assertTrue(response.status_code == 200)
|
||||||
self.assertTrue("<li>Woenzel'UT - rbatsbak - Vice-Pr" in str(response.content))
|
self.assertTrue("<li>Woenzel'UT - rbatsbak - Vice-Pr" in str(response.content))
|
||||||
|
|
||||||
def test_create_add_user_to_club_from_richard_fail(self):
|
def test_create_add_user_to_club_from_richard_fail(self):
|
||||||
self.client.login(username='root', password='plop')
|
self.client.login(username='root', password='plop')
|
||||||
self.client.post(reverse("club:club_members", kwargs={"club_id":4}), {"user": 2, "role": 3})
|
self.client.post(reverse("club:club_members", kwargs={"club_id":4}), {"user": 7, "role": 3})
|
||||||
self.client.login(username='rbatsbak', password='plop')
|
self.client.login(username='rbatsbak', password='plop')
|
||||||
response = self.client.post(reverse("club:club_members", kwargs={"club_id":4}), {"user": 4, "role": 10})
|
response = self.client.post(reverse("club:club_members", kwargs={"club_id":4}), {"user": 4, "role": 10})
|
||||||
self.assertTrue(response.status_code == 200)
|
self.assertTrue(response.status_code == 200)
|
||||||
|
Loading…
Reference in New Issue
Block a user