Skip to content

Commit

Permalink
[Tests] update futures tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeDSM committed Dec 29, 2024
1 parent 0bb4930 commit 2fe2a05
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,14 @@ async def test_get_portfolio_with_market_filter(self):
# check portfolio fetched with filtered markets (should be equal to the one with all markets)
filtered_markets_portfolio = await self.get_portfolio()
if self.EXPECT_BALANCE_FILTER_BY_MARKET_STATUS:
assert filtered_markets_portfolio == {
filtered = {
key: val
for key, val in all_markets_portfolio.items()
if key in symbols.parse_symbol(self.SYMBOL).base_and_quote()
}
assert filtered_markets_portfolio == filtered, f"{filtered_markets_portfolio=} != {filtered=}"
else:
assert filtered_markets_portfolio == all_markets_portfolio
assert filtered_markets_portfolio == all_markets_portfolio, f"{filtered_markets_portfolio=} != {all_markets_portfolio=}"

async def inner_test_get_portfolio(self):
self.check_portfolio_content(await self.get_portfolio())
Expand Down
6 changes: 2 additions & 4 deletions additional_tests/exchanges_tests/test_binance_futures.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ async def test_get_portfolio(self):
await super().test_get_portfolio()

async def test_get_portfolio_with_market_filter(self):
# pass if not implemented
pass
await super().test_get_portfolio_with_market_filter() # can have small variations failing the test when positions are open

async def test_get_account_id(self):
await super().test_get_account_id()
Expand All @@ -59,8 +58,7 @@ async def test_invalid_api_key_error(self):
await super().test_invalid_api_key_error()

async def test_get_api_key_permissions(self):
# pass if not implemented
pass
await super().test_get_api_key_permissions()

async def test_missing_trading_api_key_permissions(self):
pass
Expand Down
4 changes: 2 additions & 2 deletions additional_tests/exchanges_tests/test_kucoin_futures.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ class TestKucoinFuturesAuthenticatedExchange(
EXPECT_MISSING_FEE_IN_CANCELLED_ORDERS = False
IS_AUTHENTICATED_REQUEST_CHECK_AVAILABLE = True # set True when is_authenticated_request is implemented
EXPECTED_QUOTE_MIN_ORDER_SIZE = 40
EXPECT_BALANCE_FILTER_BY_MARKET_STATUS = True

async def test_get_portfolio(self):
await super().test_get_portfolio()

async def test_get_portfolio_with_market_filter(self):
# pass if not implemented
pass
await super().test_get_portfolio_with_market_filter() # can have small variations failing the test when positions are open

async def test_get_account_id(self):
await super().test_get_account_id()
Expand Down

0 comments on commit 2fe2a05

Please sign in to comment.