def test_roles_and_permissions(self): u = User(email='*****@*****.**', password='******') self.assertTrue(u.can(Permission.WRITE_ARTICLE)) self.assertFalse(u.can(Permission.MODERATE_COMMENTS))
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))