()
| 49 | |
| 50 | |
| 51 | def helper_test_init_sandbox(): |
| 52 | # todo: sandbox for real exchanges |
| 53 | opts = { |
| 54 | 'id': 'sampleexchange', |
| 55 | 'options': { |
| 56 | 'sandbox': False, |
| 57 | }, |
| 58 | 'urls': { |
| 59 | 'api': { |
| 60 | 'public': 'https://example.com', |
| 61 | }, |
| 62 | 'test': { |
| 63 | 'public': 'https://testnet.org', |
| 64 | }, |
| 65 | }, |
| 66 | } |
| 67 | # |
| 68 | # CASE A: when sandbox is not enabled |
| 69 | # |
| 70 | exchange3 = ccxt.Exchange(opts) |
| 71 | helper_test_sandbox_state(exchange3, False) |
| 72 | exchange3.set_sandbox_mode(True) |
| 73 | helper_test_sandbox_state(exchange3, True) |
| 74 | # |
| 75 | # CASE B: when sandbox is enabled |
| 76 | # |
| 77 | opts['options']['sandbox'] = True |
| 78 | exchange4 = ccxt.Exchange(opts) |
| 79 | helper_test_sandbox_state(exchange4, True) |
| 80 | exchange4.set_sandbox_mode(False) |
| 81 | helper_test_sandbox_state(exchange4, False) |
| 82 | |
| 83 | |
| 84 | def helper_test_init_market(): |
no test coverage detected
searching dependent graphs…