Skip to content

Commit

Permalink
Merge pull request #46 from Mai-Te-Pora/testfix/websocket_futures_chnage
Browse files Browse the repository at this point in the history
Because of the two new markets(btc_h21 and eth_h21) the test did not …
  • Loading branch information
switcheolytics committed Mar 2, 2021
2 parents 6035e01 + af4a395 commit ac26631
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
9 changes: 6 additions & 3 deletions tests/test_ws_get_market_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ def test_get_market_stats_structure(self):
'nneo2_usdc1': market_stats,
'swth_eth1': market_stats,
'swth_usdc1': market_stats,
'wbtc1_usdc1': market_stats
'wbtc1_usdc1': market_stats,
'btc_h21': market_stats,
'eth_h21': market_stats,

}
}
Expand Down Expand Up @@ -99,8 +101,9 @@ def test_get_market_stats_with_param(self):
'nneo2_usdc1': market_stats,
'swth_eth1': market_stats,
'swth_usdc1': market_stats,
'wbtc1_usdc1': market_stats

'wbtc1_usdc1': market_stats,
'btc_h21': market_stats,
'eth_h21': market_stats
}
}

Expand Down
8 changes: 3 additions & 5 deletions tests/test_ws_subscribe_market_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ def test_subscribe_market_stats_structure(self):
'nneo2_usdc1': market_stats,
'swth_eth1': market_stats,
'swth_usdc1': market_stats,
'wbtc1_usdc1': market_stats

'wbtc1_usdc1': market_stats,
'btc_h21': market_stats,
'eth_h21': market_stats,
}
}

Expand All @@ -58,7 +59,6 @@ async def on_connect():

async def on_message(message: dict):
# save response into self
print(message)
self.response.append(message)

try:
Expand All @@ -76,8 +76,6 @@ async def on_message(message: dict):
if len(self.response) < 2:
self.skipTest(f"Did not receive candlesticks within time, test can not finish.")

print(self.response[1]["result"].keys())

channel_subscription: dict = self.response[0]
self.assertDictStructure(expect_subscription, channel_subscription)

Expand Down

0 comments on commit ac26631

Please sign in to comment.