()
| 103 | |
| 104 | |
| 105 | def helper_test_properties(): |
| 106 | exchange = ccxt.Exchange({}) |
| 107 | # |
| 108 | # userAgents |
| 109 | # |
| 110 | keys = ['chrome', 'chrome39', 'chrome100'] |
| 111 | assert test_shared_methods.exchange_prop(exchange, 'userAgents') is not None |
| 112 | for i in range(0, len(keys)): |
| 113 | key = keys[i] |
| 114 | user_agent = test_shared_methods.exchange_prop(exchange, 'userAgents')[key] |
| 115 | assert user_agent is not None |
| 116 | # |
| 117 | # options |
| 118 | # |
| 119 | assert exchange.options is not None |
| 120 | # const defaultNetworkCodeReplacements = [ |
| 121 | # { 'baseCoin': 'ETH', 'primary': 'ETH', 'secondary': 'ERC20' }, |
| 122 | # { 'baseCoin': 'CRO', 'primary': 'CRONOS', 'secondary': 'CRC20' }, |
| 123 | # { 'baseCoin': 'TRX', 'primary': 'TRX', 'secondary': 'TRC20' }, |
| 124 | # { 'baseCoin': 'BTC', 'primary': 'BTC', 'secondary': 'BRC20' }, |
| 125 | # ]; |
| 126 | # testSharedMethods.assertDeepEqual (exchange, {}, 'options', exchange.options['defaultNetworkCodeReplacements'], defaultNetworkCodeReplacements); |
| 127 | # |
| 128 | # credentials |
| 129 | # |
| 130 | assert test_shared_methods.exchange_prop(exchange, 'apiKey') is None, 'apiKey should be empty string' |
| 131 | assert exchange.secret is None, 'secret should be empty string' |
| 132 | assert exchange.uid is None, 'uid should be empty string' |
| 133 | assert exchange.login is None, 'login should be empty string' |
| 134 | assert exchange.password is None, 'password should be empty string' |
| 135 | assert exchange.twofa is None, 'twofa should be undefined' |
| 136 | assert test_shared_methods.exchange_prop(exchange, 'privateKey') is None, 'privateKey should be empty string' |
| 137 | assert test_shared_methods.exchange_prop(exchange, 'walletAddress') is None, 'walletAddress should be empty string' |
| 138 | assert exchange.token is None, 'token should be empty string' |
| 139 | required_credentials = { |
| 140 | 'apiKey': True, |
| 141 | 'secret': True, |
| 142 | 'uid': False, |
| 143 | 'accountId': False, |
| 144 | 'login': False, |
| 145 | 'password': False, |
| 146 | 'twofa': False, |
| 147 | 'privateKey': False, |
| 148 | 'walletAddress': False, |
| 149 | 'token': False, |
| 150 | } |
| 151 | test_shared_methods.assert_deep_equal(exchange, {}, 'requiredCredentials', test_shared_methods.exchange_prop(exchange, 'requiredCredentials'), required_credentials) |
| 152 | # |
| 153 | # proxies |
| 154 | # |
| 155 | assert exchange.proxy is None, 'proxy should be undefined' |
| 156 | assert test_shared_methods.exchange_prop(exchange, 'proxyUrl') is None, 'proxyUrl should be undefined' |
| 157 | assert exchange.proxy_url is None, 'proxy_url should be undefined' |
| 158 | assert test_shared_methods.exchange_prop(exchange, 'proxyUrlCallback') is None, 'proxyUrlCallback should be undefined' |
| 159 | assert exchange.proxy_url_callback is None, 'proxy_url_callback should be undefined' |
| 160 | assert test_shared_methods.exchange_prop(exchange, 'httpProxy') is None, 'httpProxy should be undefined' |
| 161 | assert exchange.http_proxy is None, 'http_proxy should be undefined' |
| 162 | assert test_shared_methods.exchange_prop(exchange, 'httpProxyCallback') is None, 'httpProxyCallback should be undefined' |
no test coverage detected
searching dependent graphs…