MCPcopy Create free account
hub / github.com/ccxt/ccxt / run_private_tests

Method run_private_tests

python/ccxt/test/tests_sync.py:554–621  ·  view source on GitHub ↗
(self, exchange, symbol)

Source from the content-addressed store, hash-verified

552 return True
553
554 def run_private_tests(self, exchange, symbol):
555 if not exchange.check_required_credentials(False):
556 dump('[INFO] Skipping private tests', 'Keys not found')
557 return True
558 code = self.get_exchange_code(exchange)
559 # if (exchange.deepExtendedTest) {
560 # test ('InvalidNonce', exchange, symbol);
561 # test ('OrderNotFound', exchange, symbol);
562 # test ('InvalidOrder', exchange, symbol);
563 # test ('InsufficientFunds', exchange, symbol, balance); # danger zone - won't execute with non-empty balance
564 # }
565 tests = {
566 'signIn': [],
567 'fetchBalance': [],
568 'fetchAccounts': [],
569 'fetchTransactionFees': [],
570 'fetchTradingFees': [],
571 'fetchStatus': [],
572 'fetchOrders': [symbol],
573 'fetchOpenOrders': [symbol],
574 'fetchClosedOrders': [symbol],
575 'fetchMyTrades': [symbol],
576 'fetchLeverageTiers': [[symbol]],
577 'fetchLedger': [code],
578 'fetchTransactions': [code],
579 'fetchDeposits': [code],
580 'fetchWithdrawals': [code],
581 'fetchTransfers': [code],
582 'fetchBorrowInterest': [code, symbol],
583 'cancelAllOrders': [symbol],
584 'fetchCanceledOrders': [symbol],
585 'fetchMarginModes': [symbol],
586 'fetchPosition': [symbol],
587 'fetchDeposit': [code],
588 'createDepositAddress': [code],
589 'fetchDepositAddress': [code],
590 'fetchDepositAddresses': [code],
591 'fetchDepositAddressesByNetwork': [code],
592 'fetchBorrowRateHistory': [code],
593 'fetchLedgerEntry': [code],
594 }
595 if get_cli_arg_value('--fundedTests'):
596 tests['createOrder'] = [symbol]
597 if self.ws_tests:
598 tests = {
599 'watchBalance': [code],
600 'watchMyTrades': [symbol],
601 'watchOrders': [symbol],
602 'watchPosition': [symbol],
603 'watchPositions': [symbol],
604 }
605 market = exchange.market(symbol)
606 is_spot = market['spot']
607 if not self.ws_tests:
608 if is_spot:
609 tests['fetchCurrencies'] = []
610 else:
611 # derivatives only

Callers 1

test_exchangeMethod · 0.95

Calls 6

get_exchange_codeMethod · 0.95
run_testsMethod · 0.95
dumpFunction · 0.90
get_cli_arg_valueFunction · 0.90
marketMethod · 0.45

Tested by

no test coverage detected