fix(test): resolve E501 line too long in test_apify_tool.py

This commit is contained in:
mubarakar95
2026-02-14 15:47:06 +05:30
parent 032dd13f5a
commit 47117281e1
+4 -1
View File
@@ -140,7 +140,10 @@ class TestHTTPErrors:
def test_401_returns_auth_error(self, run_actor_fn, monkeypatch):
"""HTTP 401 returns invalid token error."""
monkeypatch.setenv("APIFY_API_TOKEN", "bad-token")
with patch("httpx.request", return_value=_mock_response(401, {"error": {"message": "Invalid token"}})):
with patch(
"httpx.request",
return_value=_mock_response(401, {"error": {"message": "Invalid token"}}),
):
result = run_actor_fn(actor_id="apify/test", input={}, wait=True)
assert "error" in result
assert "Invalid Apify API token" in result["error"]