From bd7775c94af29752928a25a2c4074d41a67e23e6 Mon Sep 17 00:00:00 2001 From: zakir <80246097+zakir-code@users.noreply.github.com> Date: Tue, 10 Oct 2023 18:50:28 +0800 Subject: [PATCH] add query oracle test --- tests/test_mx_query.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tests/test_mx_query.py diff --git a/tests/test_mx_query.py b/tests/test_mx_query.py new file mode 100644 index 0000000..a3ab4b7 --- /dev/null +++ b/tests/test_mx_query.py @@ -0,0 +1,30 @@ +import unittest + +from fxsdk.client.mx_client import MxClient + +grpc_cli = MxClient('localhost:9090') + +pair_id = 'btc:cusd' + + +class TestMxClientQuery(unittest.TestCase): + + def test_query_oracle_price(self): + price = grpc_cli.query_oracle_price(pair_id) + print(price) + + def test_query_oracle_prices(self): + prices = grpc_cli.query_oracle_prices() + print(prices) + + def test_query_oracle_market(self): + market = grpc_cli.query_oracle_market(pair_id) + print(market) + + def test_query_oracle_markets(self): + markets = grpc_cli.query_oracle_markets() + print(markets) + + +if __name__ == '__main__': + unittest.main()