Skip to content

Commit

Permalink
[Tests] update mexc tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeDSM committed Jan 10, 2025
1 parent 5666c5e commit 215df1b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import octobot_commons.constants as constants
import octobot_commons.enums as commons_enums
import octobot_commons.symbols as symbols
import octobot_commons.configuration as commons_configuration
import octobot_trading.errors as trading_errors
import octobot_trading.enums as trading_enums
import octobot_trading.constants as trading_constants
Expand Down Expand Up @@ -109,6 +110,9 @@ class AbstractAuthenticatedExchangeTester:
# Add method call to subclasses to be able to run them independently

async def test_get_portfolio(self):
# encoded_a = _get_encoded_value("") # tool to get encoded values
# encoded_b = _get_encoded_value("")
# encoded_c = _get_encoded_value("")
async with self.local_exchange_manager():
await self.inner_test_get_portfolio()

Expand Down Expand Up @@ -1443,3 +1447,7 @@ def market_filter(market):
)

return market_filter


def _get_encoded_value(raw) -> str:
return commons_configuration.encrypt(raw).decode()
12 changes: 6 additions & 6 deletions additional_tests/exchanges_tests/test_mexc.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class TestMEXCAuthenticatedExchange(
CONVERTS_ORDER_SIZE_BEFORE_PUSHING_TO_EXCHANGES = True
CANCELLED_ORDERS_IN_CLOSED_ORDERS = True
EXPECT_MISSING_FEE_IN_CANCELLED_ORDERS = False
IS_ACCOUNT_ID_AVAILABLE = False
USE_ORDER_OPERATION_TO_CHECK_API_KEY_RIGHTS = True

async def test_get_portfolio(self):
await super().test_get_portfolio()
Expand All @@ -42,8 +44,7 @@ async def test_get_portfolio_with_market_filter(self):
await super().test_get_portfolio_with_market_filter()

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

async def test_is_authenticated_request(self):
await super().test_is_authenticated_request()
Expand All @@ -52,11 +53,10 @@ 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
await super().test_missing_trading_api_key_permissions()

async def test_get_not_found_order(self):
await super().test_get_not_found_order()
Expand All @@ -83,7 +83,7 @@ async def test_get_cancelled_orders(self):
await super().test_get_cancelled_orders()

async def test_create_and_cancel_stop_orders(self):
# pass if not implemented
# NOT SUPPORTED by MEXC API (10/01/25)
pass

async def test_edit_limit_order(self):
Expand Down

0 comments on commit 215df1b

Please sign in to comment.