def test_make_it(self): sot = container.Container(EXAMPLE) self.assertEqual(EXAMPLE['container_ref'], sot.container_ref) self.assertEqual(EXAMPLE['created'], sot.created) self.assertEqual(EXAMPLE['name'], sot.name) self.assertEqual(EXAMPLE['secret_refs'], sot.secret_refs) self.assertEqual(EXAMPLE['status'], sot.status) self.assertEqual(EXAMPLE['type'], sot.type) self.assertEqual(EXAMPLE['updated'], sot.updated) self.assertEqual(EXAMPLE['container_ref'], sot.id)
def test_basic(self): sot = container.Container() self.assertEqual(None, sot.resource_key) self.assertEqual('containers', sot.resources_key) self.assertEqual('/containers', sot.base_path) self.assertEqual('keystore', 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 get_container(self, **data): return container.Container(data).get(self.session)
def update_container(self, **data): return container.Container(data).update(self.session)
def delete_container(self, **data): container.Container(data).delete(self.session)