~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.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
fix(tests): patch all middleware db_manager bindings in followup API tests (#3602)
LearningCircuit774358fa039c
diff --git a/tests/test_followup_api.py b/tests/test_followup_api.pyindex e62fe685a0..aa4452f625 100644--- a/tests/test_followup_api.py+++ b/tests/test_followup_api.py@@ -27,6 +27,11 @@ class TestFollowUpAPI:def mock_db_manager(self):"""Mock the database manager for all tests.+ Patches all module-level db_manager bindings used by Flask+ before_request middleware so unpatched middleware doesn't hit+ the real db_manager singleton (which lacks a "testuser" connection,+ causing 401s).+has_encryption=False avoids the early password check in routesthat returns 401 when encrypted DB password is unavailable."""@@ -37,9 +42,26 @@ class TestFollowUpAPI:patch("local_deep_research.database.encrypted_db.db_manager") as mock_enc_db,+ patch(+ "local_deep_research.web.auth.database_middleware.db_manager"+ ) as mock_mw_db,+ patch(+ "local_deep_research.web.auth.session_cleanup.db_manager"+ ) as mock_sc_db,+ patch(+ "local_deep_research.web.auth.queue_middleware.db_manager"+ ) as mock_qm_db,):- mock_db.connections = {"testuser": MagicMock()}- mock_enc_db.has_encryption = False+ for mock in [+ mock_db,+ mock_enc_db,+ mock_mw_db,+ mock_sc_db,+ mock_qm_db,+ ]:+ mock.connections = {"testuser": MagicMock()}+ mock.has_encryption = False+ mock.is_user_connected.return_value = Trueyield mock_db@pytest.fixture