Exemplo n.º 1
0
 def assertRoleDBObjectExists(self, role_db):
     result = Role.get_by_id(str(role_db.id))
     self.assertTrue(result)
     self.assertEqual(role_db.id, result.id)
Exemplo n.º 2
0
 def test_insert(self):
     role_db = RoleDB(name='role-1', description='test role', system=True)
     created = Role.insert(role_db)
     retrieved = Role.get_by_id(created.id)
     self.assertEqual(retrieved.name, role_db.name,
                      'Failed to save RoleDB object.')
Exemplo n.º 3
0
 def test_insert(self):
     role_db = RoleDB(name="role-1", description="test role", system=True)
     created = Role.insert(role_db)
     retrieved = Role.get_by_id(created.id)
     self.assertEqual(retrieved.name, role_db.name, "Failed to save RoleDB object.")
Exemplo n.º 4
0
 def assertRoleDBObjectExists(self, role_db):
     result = Role.get_by_id(str(role_db.id))
     self.assertTrue(result)
     self.assertEqual(role_db.id, result.id)