def test_cancel_order(self, access_token): client = Client(access_token) orders = client.get_pending_orders() for order in orders: res = client.cancel_order(order) self.assertEqual(res.result, "success") self.assertEqual(res.error_code, 0)
def test_cancel_order_with_mock(self, mock_request): _ = mock_request client = Client("access_token") orders = client.get_pending_orders() for order in orders: res = client.cancel_order(order) self.assertEqual(res.result, "success") self.assertEqual(res.error_code, 0)