forked from DGNum/gestioCOF
Fix tests
This commit is contained in:
parent
1450b65dcd
commit
47f406e09e
3 changed files with 44 additions and 40 deletions
|
@ -284,7 +284,11 @@ class TemporaryAuthTests(TestCase):
|
|||
self.perm = Permission.objects.get(
|
||||
content_type__app_label="kfet", codename="is_team"
|
||||
)
|
||||
self.user2.user_permissions.add(self.perm)
|
||||
self.perm2 = Permission.objects.get(
|
||||
content_type__app_label="kfet", codename="can_force_close"
|
||||
)
|
||||
self.user1.user_permissions.add(self.perm)
|
||||
self.user2.user_permissions.add(self.perm, self.perm2)
|
||||
|
||||
def test_context_processor(self):
|
||||
"""
|
||||
|
@ -295,7 +299,7 @@ class TemporaryAuthTests(TestCase):
|
|||
r = self.client.post("/k-fet/accounts/000/edit", HTTP_KFETPASSWORD="kfet_user2")
|
||||
|
||||
self.assertEqual(r.context["user"], self.user1)
|
||||
self.assertNotIn("kfet.is_team", r.context["perms"])
|
||||
self.assertNotIn("kfet.can_force_close", r.context["perms"])
|
||||
|
||||
def test_auth_not_persistent(self):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue