-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
60f5c56
commit bd7775c
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |