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