Esempio n. 1
0
    def test_cancel_order(self, access_token, secret_key):
        client = Client(access_token, secret_key)

        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)
Esempio n. 2
0
    def test_cancel_order_with_mock(self, mock_request):
        _ = mock_request

        client = Client("access_token", "secret_key")

        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)