forked from Rockachopa/Timmy-time-dashboard
This commit is contained in:
@@ -561,9 +561,8 @@ class TestModelPostInit:
|
||||
env = {k: v for k, v in os.environ.items() if k != "GITEA_TOKEN"}
|
||||
with patch.dict(os.environ, env, clear=True):
|
||||
s = Settings()
|
||||
# Override repo_root so post_init finds our temp file
|
||||
original_compute = s._compute_repo_root
|
||||
|
||||
# Override repo_root so post_init finds our temp file
|
||||
def _fake_root():
|
||||
return str(tmp_path)
|
||||
|
||||
@@ -704,7 +703,6 @@ class TestGetEffectiveOllamaModel:
|
||||
from config import get_effective_ollama_model, settings
|
||||
|
||||
# Make primary unavailable, but one fallback available
|
||||
primary = settings.ollama_model
|
||||
fallback_target = settings.fallback_models[0]
|
||||
|
||||
def side_effect(model):
|
||||
@@ -804,9 +802,7 @@ class TestValidateStartup:
|
||||
with patch.object(config.settings, "timmy_env", "production"):
|
||||
with patch.object(config.settings, "l402_hmac_secret", "secret1"):
|
||||
with patch.object(config.settings, "l402_macaroon_secret", "secret2"):
|
||||
with patch.object(
|
||||
config.settings, "cors_origins", ["http://localhost:3000"]
|
||||
):
|
||||
with patch.object(config.settings, "cors_origins", ["http://localhost:3000"]):
|
||||
config.validate_startup(force=True)
|
||||
assert config._startup_validated is True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user