Пример #1
0
 def test_make_it(self):
     sot = order.Order(EXAMPLE)
     self.assertEqual(EXAMPLE['error_reason'], sot.error_reason)
     self.assertEqual(EXAMPLE['error_status_code'], sot.error_status_code)
     self.assertEqual(EXAMPLE['meta'], sot.meta)
     self.assertEqual(EXAMPLE['order_ref'], sot.order_ref)
     self.assertEqual(EXAMPLE['secret_ref'], sot.secret_ref)
     self.assertEqual(EXAMPLE['status'], sot.status)
     self.assertEqual(EXAMPLE['type'], sot.type)
Пример #2
0
 def test_basic(self):
     sot = order.Order()
     self.assertIsNone(sot.resource_key)
     self.assertEqual('orders', sot.resources_key)
     self.assertEqual('/orders', 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)
Пример #3
0
 def test_basic(self):
     sot = order.Order()
     self.assertIsNone(sot.resource_key)
     self.assertEqual('orders', sot.resources_key)
     self.assertEqual('/orders', 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)
Пример #4
0
 def test_make_it(self):
     sot = order.Order(**EXAMPLE)
     self.assertEqual(EXAMPLE['created'], sot.created_at)
     self.assertEqual(EXAMPLE['creator_id'], sot.creator_id)
     self.assertEqual(EXAMPLE['meta'], sot.meta)
     self.assertEqual(EXAMPLE['order_ref'], sot.order_ref)
     self.assertEqual(ID_VAL, sot.order_id)
     self.assertEqual(EXAMPLE['secret_ref'], sot.secret_ref)
     self.assertEqual(SECRET_ID, sot.secret_id)
     self.assertEqual(EXAMPLE['status'], sot.status)
     self.assertEqual(EXAMPLE['sub_status'], sot.sub_status)
     self.assertEqual(EXAMPLE['sub_status_message'], sot.sub_status_message)
     self.assertEqual(EXAMPLE['type'], sot.type)
     self.assertEqual(EXAMPLE['updated'], sot.updated_at)