see this commit
as per the tests pattern, we need the 2 following tests:
see here
def test_check_string_is_invalid_should_return_true_when_response_has_status_code_414():
response = httpx.Response(414)
assert client_module.check_string_is_invalid(response) is True
see here
@pytest.mark.asyncio
async def test_scopus_search_fetch_should_raise_invalid_string_error_when_status_code_is_414(
httpx_mock: HTTPXMock,
):
httpx_mock.add_response(414)
client = client_module.ScopusClient(["k1", "k2"])
with pytest.raises(client_module.InvalidStringError):
async for _ in client.search("code"):
pass
see this commit
as per the tests pattern, we need the 2 following tests:
see here
see here