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: Update tests to match API behavior and show all test results

LearningCircuit79978f972410
diff --git a/tests/api_tests_with_login/pytest_tests/test_research_validation.py b/tests/api_tests_with_login/pytest_tests/test_research_validation.py
index b002f281e9..bf10103d39 100644
--- a/tests/api_tests_with_login/pytest_tests/test_research_validation.py
+++ b/tests/api_tests_with_login/pytest_tests/test_research_validation.py
@@ -7,12 +7,12 @@ def test_research_without_required_fields(auth_session, base_url):
"""Test validation of required fields"""
session, csrf_token = auth_session
+ # Only test truly invalid requests
+ # Note: Empty model is now allowed and uses defaults from database
invalid_requests = [
- {}, # Empty request
+ {}, # Empty request - missing query
{"model": "gemma3n:e2b"}, # Missing query
- {"query": "test"}, # Missing model
{"query": "", "model": "gemma3n:e2b"}, # Empty query
- {"query": "test", "model": ""}, # Empty model
]
for data in invalid_requests:
@@ -23,6 +23,21 @@ def test_research_without_required_fields(auth_session, base_url):
)
print(f"✓ Correctly rejected invalid request: {data}")
+ # Test that requests with query but no model are accepted (uses defaults)
+ valid_requests_with_defaults = [
+ {"query": "test"}, # Missing model - uses default
+ {"query": "test", "model": ""}, # Empty model - uses default
+ ]
+
+ for data in valid_requests_with_defaults:
+ response = session.post(f"{base_url}/api/start_research", json=data)
+
+ # Requests with query but missing/empty model should succeed (200 or research started)
+ assert response.status_code == 200, (
+ f"Expected success for {data}, got {response.status_code}"
+ )
+ print(f"✓ Correctly accepted request with default model: {data}")
+
def test_research_requires_authentication(base_url):
"""Test that research API requires authentication"""
diff --git a/tests/run_all_tests.py b/tests/run_all_tests.py
index 2e76309cbe..10c463a2e9 100755
--- a/tests/run_all_tests.py
+++ b/tests/run_all_tests.py
@@ -486,12 +486,11 @@ class TestRunner:
[
"--tb=line", # Show one line per failure for easier debugging
"--timeout=60", # Per-test timeout of 60 seconds
- "--maxfail=5", # Stop after 5 failures to avoid overwhelming output
- "-x", # Stop on first failure to see exactly what's wrong
+ # Removed -x and --maxfail to show all test results
]
)
self.log(
- "Running in CI mode with verbose output and failure-first debugging"
+ "Running in CI mode with verbose output - showing all test results"
)
return self.run_command(cmd, "All Pytest Tests", timeout=timeout)