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 API security tests to handle tuple return from create_app()

LearningCircuitb1b0b86b567e
diff --git a/tests/security/test_api_security.py b/tests/security/test_api_security.py
index 84b017b934..a7a3e09503 100644
--- a/tests/security/test_api_security.py
+++ b/tests/security/test_api_security.py
@@ -19,9 +19,11 @@ class TestAPISecurityOWASPTop10:
"""Create a test client."""
from src.local_deep_research.web.app import create_app
- app = create_app()
+ app, _ = create_app() # Unpack tuple (app, socket_service)
app.config["TESTING"] = True
app.config["WTF_CSRF_ENABLED"] = False
+ # Enable CORS for testing (tests expect open CORS)
+ app.config["SECURITY_CORS_ALLOWED_ORIGINS"] = "*"
return app.test_client()
# API1:2023 - Broken Object Level Authorization (BOLA)
@@ -280,9 +282,11 @@ class TestAPIInputValidation:
"""Create a test client."""
from src.local_deep_research.web.app import create_app
- app = create_app()
+ app, _ = create_app() # Unpack tuple (app, socket_service)
app.config["TESTING"] = True
app.config["WTF_CSRF_ENABLED"] = False
+ # Enable CORS for testing (tests expect open CORS)
+ app.config["SECURITY_CORS_ALLOWED_ORIGINS"] = "*"
return app.test_client()
def test_json_parsing_errors_handled(self, client):
@@ -348,8 +352,10 @@ class TestAPIRateLimiting:
"""Create a test client."""
from src.local_deep_research.web.app import create_app
- app = create_app()
+ app, _ = create_app() # Unpack tuple (app, socket_service)
app.config["TESTING"] = True
+ # Enable CORS for testing (tests expect open CORS)
+ app.config["SECURITY_CORS_ALLOWED_ORIGINS"] = "*"
return app.test_client()
def test_rate_limiting_on_expensive_endpoints(self, client):