def test_make_it(self): sot = policy.Policy(**EXAMPLE) self.assertEqual(EXAMPLE['blob'], sot.blob) self.assertEqual(EXAMPLE['id'], sot.id) self.assertEqual(EXAMPLE['links'], sot.links) self.assertEqual(EXAMPLE['project_id'], sot.project_id) self.assertEqual(EXAMPLE['type'], sot.type) self.assertEqual(EXAMPLE['user_id'], sot.user_id)
def test_basic(self): sot = policy.Policy() self.assertEqual('policy', sot.resource_key) self.assertEqual('policies', sot.resources_key) self.assertEqual('/policies', 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)
def test_basic(self): sot = policy.Policy() self.assertEqual('policy', sot.resource_key) self.assertEqual('policies', sot.resources_key) self.assertEqual('/policies', 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) self.assertEqual('PATCH', sot.commit_method)
def get_policy(self, **data): return policy.Policy(data).get(self.session)
def delete_policy(self, **data): policy.Policy(data).delete(self.session)
def create_policy(self, **data): return policy.Policy(data).create(self.session)
def update_policy(self, **data): return policy.Policy(data).update(self.session)
def test_make_it(self): sot = policy.Policy(EXAMPLE) self.assertEqual(EXAMPLE['blob'], sot.blob) self.assertEqual(EXAMPLE['id'], sot.id) self.assertEqual(EXAMPLE['type'], sot.type)