示例#1
0
 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)
示例#2
0
 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)
示例#3
0
 def get_container(self, **data):
     return container.Container(data).get(self.session)
示例#4
0
 def update_container(self, **data):
     return container.Container(data).update(self.session)
示例#5
0
 def delete_container(self, **data):
     container.Container(data).delete(self.session)