Exemplo n.º 1
0
 def test_has_two_permissions(self):
     self.role.permissions.append(Permission.build_permission('other').key())
     for permission in self.role.permissions:
         self.assertTrue(self.role.has_permission(Permission.get(permission).name))
Exemplo n.º 2
0
 def setUp(self):
     self.permission = Permission.build_permission("admin_menu")
     self.role = Role.build_role(Role.ADMIN, self.permission.key())
Exemplo n.º 3
0
 def test_contains_two_permissions(self):
     self.role.permissions.append(Permission.build_permission('other').key())
     self.assertTrue(len(self.role.permissions) == 2)