Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix(tests): narrow broad status-code tautologies in test_history_routes.py (#4154)

LearningCircuit6b16de5e6ec4
diff --git a/tests/web/routes/test_history_routes.py b/tests/web/routes/test_history_routes.py
index 2c53362833..59a6215029 100644
--- a/tests/web/routes/test_history_routes.py
+++ b/tests/web/routes/test_history_routes.py
@@ -65,7 +65,7 @@ class TestHistoryPage:
"""Should require authentication."""
response = client.get(f"{HISTORY_PREFIX}/")
# Should redirect to login or return 401
- assert response.status_code in [401, 302, 404]
+ assert response.status_code == 404, response.status_code
def test_returns_page_when_authenticated(self, authenticated_client):
"""Should return history page when authenticated."""
@@ -83,7 +83,7 @@ class TestGetHistory:
def test_requires_authentication(self, client):
"""Should require authentication."""
response = client.get(f"{HISTORY_PREFIX}/api")
- assert response.status_code in [401, 302, 404]
+ assert response.status_code == 404, response.status_code
def test_returns_history_when_authenticated(self, authenticated_client):
"""Should return history items when authenticated."""
@@ -234,7 +234,7 @@ class TestGetResearchStatus:
def test_requires_authentication(self, client):
"""Should require authentication."""
response = client.get(f"{HISTORY_PREFIX}/status/test-id")
- assert response.status_code in [401, 302, 404]
+ assert response.status_code == 404, response.status_code
def test_returns_404_for_nonexistent(self, authenticated_client):
"""Should return 404 for non-existent research."""
@@ -308,7 +308,7 @@ class TestGetResearchDetails:
def test_requires_authentication(self, client):
"""Should require authentication."""
response = client.get(f"{HISTORY_PREFIX}/details/test-id")
- assert response.status_code in [401, 302, 404]
+ assert response.status_code == 404, response.status_code
def test_returns_404_for_nonexistent(self, authenticated_client):
"""Should return 404 for non-existent research."""
@@ -397,7 +397,7 @@ class TestGetReport:
def test_requires_authentication(self, client):
"""Should require authentication."""
response = client.get(f"{HISTORY_PREFIX}/report/test-id")
- assert response.status_code in [401, 302, 404]
+ assert response.status_code == 404, response.status_code
def test_returns_404_for_nonexistent(self, authenticated_client):
"""Should return 404 for non-existent research."""
@@ -480,7 +480,7 @@ class TestGetMarkdown:
def test_requires_authentication(self, client):
"""Should require authentication."""
response = client.get(f"{HISTORY_PREFIX}/markdown/test-id")
- assert response.status_code in [401, 302, 404]
+ assert response.status_code == 404, response.status_code
def test_returns_markdown_for_existing(self, authenticated_client):
"""Should return markdown for existing research."""
@@ -532,7 +532,7 @@ class TestGetResearchLogs:
def test_requires_authentication(self, client):
"""Should require authentication."""
response = client.get(f"{HISTORY_PREFIX}/logs/test-id")
- assert response.status_code in [401, 302, 404]
+ assert response.status_code == 404, response.status_code
def test_returns_404_for_nonexistent(self, authenticated_client):
"""Should return 404 for non-existent research."""
@@ -687,7 +687,7 @@ class TestGetLogCount:
def test_requires_authentication(self, client):
"""Should require authentication."""
response = client.get(f"{HISTORY_PREFIX}/log_count/test-id")
- assert response.status_code in [401, 302, 404]
+ assert response.status_code == 404, response.status_code
def test_returns_log_count(self, authenticated_client):
"""Should return log count for research."""