Exemple #1
0
 def test_roles_and_permissions(self):
     u = User(email='*****@*****.**', password='******')
     self.assertTrue(u.can(Permission.WRITE_ARTICLE))
     self.assertFalse(u.can(Permission.MODERATE_COMMENTS))
Exemple #2
0
 def test_roles_and_permissions(self):
     Role.insert_roles()
     u = User(email='*****@*****.**', password='******')
     self.assertTrue(u.can(Permission.WRITE_ARITICLES))
     self.assertFalse(u.can(Permission.MODERATE_COMMENTS))