(translator, server, monkeypatch)
| 247 | |
| 248 | @needs_mock_server |
| 249 | def 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 |
nothing calls this directly
no test coverage detected