Commits

Anonymous committed cc48d4e

add tests for invalid permissions

  • Participants
  • Parent commits 08daa77

Comments (0)

Files changed (1)

File djangotoolbox/auth/tests.py

         pl = UserPermissionList.objects.all()[0]
         self.assertEqual(pl.permissions , set([perm]))
         self.assertEqual(user.has_perm('auth.test'), True)
+        self.assertEqual(user.has_perm('auth.test23x'), False)
 
     def test_add_user_to_group(self):
         user = User.objects.get(username='test')
         gl = GroupPermissionList.objects.all()[0]
         self.assertEqual(gl.permissions , set([perm]))
         self.assertEqual(user.has_perm('auth.test'), True)
+        self.assertEqual(user.has_perm('auth.test2312'), False)
         
     def test_has_perm(self):
         user = User.objects.get(username='test')