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(test): detect _get_setting() pattern and update warning message assertions (#3347)

LearningCircuit05f824afada5
diff --git a/tests/settings/test_settings_defaults_integrity.py b/tests/settings/test_settings_defaults_integrity.py
index 1c4d1279e3..cc5e4cfc4c 100644
--- a/tests/settings/test_settings_defaults_integrity.py
+++ b/tests/settings/test_settings_defaults_integrity.py
@@ -184,6 +184,7 @@ def collect_consumed_setting_keys() -> set:
_deprecated_fn = "get_setting_from_db" + "_main_thread"
patterns = [
r'get_setting\(\s*["\']([^"\']+)["\']',
+ r'_get_setting\([^,]+,\s*["\']([^"\']+)["\']',
r'get_setting_from_snapshot\(\s*["\']([^"\']+)["\']',
r'get_bool_setting\(\s*["\']([^"\']+)["\']',
r'extract_setting_value\([^,]+,\s*["\']([^"\']+)["\']',
diff --git a/tests/web/warning_checks/test_hardware.py b/tests/web/warning_checks/test_hardware.py
index f7fa687cb5..931c9d34d9 100644
--- a/tests/web/warning_checks/test_hardware.py
+++ b/tests/web/warning_checks/test_hardware.py
@@ -52,9 +52,9 @@ class TestCheckHighContext:
assert result is not None
assert result["type"] == "high_context"
- def test_provider_name_in_message(self):
+ def test_context_size_in_message(self):
result = check_high_context("ollama", 16384, dismissed=False)
- assert "ollama" in result["message"]
+ assert "16,384" in result["message"]
def test_warning_dict_has_all_required_keys(self):
result = check_high_context("ollama", 16384, dismissed=False)
diff --git a/tests/web/warning_checks/test_hardware_high_value.py b/tests/web/warning_checks/test_hardware_high_value.py
index 6e403b1045..65d3512594 100644
--- a/tests/web/warning_checks/test_hardware_high_value.py
+++ b/tests/web/warning_checks/test_hardware_high_value.py
@@ -45,7 +45,6 @@ class TestCheckHighContext:
assert result is not None
assert result["type"] == "high_context"
assert "16,384" in result["message"]
- assert "ollama" in result["message"]
def test_llamacpp_high_context(self):
result = check_high_context("llamacpp", 32768, False)
diff --git a/tests/web/warning_checks/test_warning_checks_high_value.py b/tests/web/warning_checks/test_warning_checks_high_value.py
index 4e4bd3c03c..16fa7a439c 100644
--- a/tests/web/warning_checks/test_warning_checks_high_value.py
+++ b/tests/web/warning_checks/test_warning_checks_high_value.py
@@ -107,10 +107,10 @@ class TestCheckHighContextEdgeCases:
result = check_high_context("ollama", 16384, False)
assert "16,384" in result["message"]
- def test_provider_in_message(self):
- """Warning message includes provider name."""
+ def test_context_size_in_message(self):
+ """Warning message includes context size."""
result = check_high_context("ollama", 16384, False)
- assert "ollama" in result["message"]
+ assert "16,384" in result["message"]
class TestCheckContextBelowHistoryEdgeCases: