def test_get_orders(requests_post, logger):
client = build_client()
output = client.get_orders()
assert output == test_body
requests_post.assert_called_with(
url=build_url('/open_orders'),
json={
'book': test_book,
'key': test_key,
'nonce': test_nonce,
'signature': mock.ANY
}
)
logger.debug.assert_called_with(
"[client: test_client_id] get user's open orders for btc_usd")
with pytest.raises(InvalidOrderBookError):
client.get_orders(book='invalid_book')
评论列表
文章目录