def testAdministratorPermissions(self): administrator = User(email="*****@*****.**", username="******", password="******") self.assertTrue(administrator.can(Permission.FOLLOW)) self.assertTrue(administrator.can(Permission.ADMINISTER))
def testUserPermissions(self): user = User(email="*****@*****.**", username="******", password="******") self.assertTrue(user.can(Permission.FOLLOW)) self.assertFalse(user.can(Permission.ADMINISTER))