mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-27 10:49:05 +01:00
Address code review feedback: improve test parameter handling
Co-authored-by: kuhyx <147418882+kuhyx@users.noreply.github.com>
This commit is contained in:
parent
a65d933eec
commit
e934e50461
@ -208,7 +208,8 @@ class TestGenerateAnkiPackage:
|
|||||||
"""Test that download errors are handled gracefully."""
|
"""Test that download errors are handled gracefully."""
|
||||||
test_codes = {200: "OK", 404: "Not Found"}
|
test_codes = {200: "OK", 404: "Not Found"}
|
||||||
|
|
||||||
def mock_download(code: int, *, use_cache: bool) -> bytes: # noqa: ARG001
|
def mock_download(code: int, *, use_cache: bool) -> bytes:
|
||||||
|
del use_cache # Intentionally unused in test mock
|
||||||
error_msg = "Failed"
|
error_msg = "Failed"
|
||||||
if code == 404:
|
if code == 404:
|
||||||
raise requests.exceptions.RequestException(error_msg)
|
raise requests.exceptions.RequestException(error_msg)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user