Beispiel #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_at)
     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_at)
     self.assertEqual(EXAMPLE['container_ref'], sot.id)
 def test_basic(self):
     sot = container.Container()
     self.assertIsNone(sot.resource_key)
     self.assertEqual('containers', sot.resources_key)
     self.assertEqual('/containers', 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)
Beispiel #3
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('key-manager', 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)
Beispiel #4
0
 def test_make_it(self):
     sot = container.Container(EXAMPLE)
     self.assertEqual(EXAMPLE['container_ref'], sot.container_ref)
     dt = datetime.datetime(2015, 3, 9, 12, 14, 57,
                            233772).replace(tzinfo=None)
     self.assertEqual(dt, sot.created_at.replace(tzinfo=None))
     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)
     dt = datetime.datetime(2015, 3, 9, 12, 15, 57,
                            233772).replace(tzinfo=None)
     self.assertEqual(dt, sot.updated_at.replace(tzinfo=None))
     self.assertEqual(EXAMPLE['container_ref'], sot.id)