Exemple #1
0
 def test_basic(self):
     sot = tenant.Tenant()
     self.assertEqual('tenant', sot.resource_key)
     self.assertEqual('tenants', sot.resources_key)
     self.assertEqual('/tenants', sot.base_path)
     self.assertTrue(sot.allow_create)
     self.assertTrue(sot.allow_fetch)
     self.assertTrue(sot.allow_commit)
     self.assertTrue(sot.allow_delete)
     self.assertTrue(sot.allow_list)
Exemple #2
0
 def test_basic(self):
     sot = tenant.Tenant()
     self.assertEqual('tenant', sot.resource_key)
     self.assertEqual('tenants', sot.resources_key)
     self.assertEqual('/tenants', sot.base_path)
     self.assertEqual('identity', sot.service.service_type)
     self.assertTrue(sot.allow_create)
     self.assertTrue(sot.allow_retrieve)
     self.assertTrue(sot.allow_update)
     self.assertTrue(sot.allow_delete)
     self.assertTrue(sot.allow_list)
Exemple #3
0
 def test_make_it(self):
     sot = tenant.Tenant(EXAMPLE)
     self.assertEqual(EXAMPLE['description'], sot.description)
     self.assertEqual(EXAMPLE['enabled'], sot.enabled)
     self.assertEqual(EXAMPLE['id'], sot.id)
     self.assertEqual(EXAMPLE['name'], sot.name)
Exemple #4
0
 def update_tenant(self, **data):
     return tenant.Tenant(data).update(self.session)
Exemple #5
0
 def get_tenant(self, **data):
     return tenant.Tenant(data).get(self.session)
Exemple #6
0
 def delete_tenant(self, **data):
     tenant.Tenant(data).delete(self.session)
Exemple #7
0
 def create_tenant(self, **data):
     return tenant.Tenant(data).create(self.session)