MCPcopy Index your code
hub / github.com/DeepL/deepl-python / test_usage_no_response

Function test_usage_no_response

tests/test_general.py:249–257  ·  view source on GitHub ↗
(translator, server, monkeypatch)

Source from the content-addressed store, hash-verified

247
248@needs_mock_server
249def test_usage_no_response(translator, server, monkeypatch):
250 server.no_response(2)
251
252 # Lower the retry count and timeout for this test, and restore after test
253 monkeypatch.setattr(deepl.http_client, "max_network_retries", 0)
254 monkeypatch.setattr(deepl.http_client, "min_connection_timeout", 1.0)
255
256 with pytest.raises(deepl.exceptions.ConnectionException):
257 translator.get_usage()
258
259
260@needs_mock_server

Callers

nothing calls this directly

Calls 2

no_responseMethod · 0.80
get_usageMethod · 0.80

Tested by

no test coverage detected