コード例 #1
0
 def test_should_include_errors_in_str(self):
     order_args = self._get_order_args(self.key_order_data)
     error_code = 500
     error_reason = 'Something is broken'
     order_obj = orders.KeyOrder(api=None,
                                 error_status_code=error_code,
                                 error_reason=error_reason,
                                 **order_args)
     self.assertIn(str(error_code), str(order_obj))
     self.assertIn(error_reason, str(order_obj))
コード例 #2
0
 def test_should_include_order_ref_in_repr(self):
     order_args = self._get_order_args(self.key_order_data)
     order_obj = orders.KeyOrder(api=None, **order_args)
     self.assertIn('order_ref=' + self.entity_href, repr(order_obj))