(self, exchange, method, skip_keys, data)
| 972 | return True |
| 973 | |
| 974 | def test_response_statically(self, exchange, method, skip_keys, data): |
| 975 | expected_result = exchange.safe_value(data, 'parsedResponse') |
| 976 | mocked_exchange = set_fetch_response(exchange, data['httpResponse']) |
| 977 | if self.info: |
| 978 | dump('[INFO] STATIC RESPONSE TEST:', method, ':', data['description']) |
| 979 | try: |
| 980 | if not is_sync(): |
| 981 | unified_result = call_exchange_method_dynamically(exchange, method, self.sanitize_data_input(data['input'])) |
| 982 | self.assert_static_response_output(mocked_exchange, skip_keys, unified_result, expected_result) |
| 983 | else: |
| 984 | unified_result_sync = call_exchange_method_dynamically_sync(exchange, method, self.sanitize_data_input(data['input'])) |
| 985 | self.assert_static_response_output(mocked_exchange, skip_keys, unified_result_sync, expected_result) |
| 986 | except Exception as e: |
| 987 | self.response_tests_failed = True |
| 988 | error_message = '[' + self.lang + '][STATIC_RESPONSE]' + '[' + exchange.id + ']' + '[' + method + ']' + '[' + data['description'] + ']' + exception_message(e) |
| 989 | dump('[TEST_FAILURE]' + error_message) |
| 990 | set_fetch_response(exchange, None) # reset state |
| 991 | return True |
| 992 | |
| 993 | def init_offline_exchange(self, exchange_name): |
| 994 | markets = self.load_markets_from_file(exchange_name) |
no test coverage detected