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)
def test_basic(self): sot = order.Order() self.assertEqual(None, sot.resource_key) self.assertEqual('orders', sot.resources_key) self.assertEqual('/orders', 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 update_order(self, **data): return order.Order(data).update(self.session)
def get_order(self, **data): return order.Order(data).get(self.session)
def delete_order(self, **data): order.Order(data).delete(self.session)
def create_order(self, **data): return order.Order(data).create(self.session)