Skip to content

Commit

Permalink
add query oracle test
Browse files Browse the repository at this point in the history
  • Loading branch information
zakir-code committed Oct 10, 2023
1 parent 60f5c56 commit bd7775c
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tests/test_mx_query.py
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit bd7775c

Please sign in to comment.