Improve test coverance and fixes according to tests

This commit is contained in:
2026-03-05 11:46:48 +02:00
parent 2dfd625b5e
commit 03ba3fb3c2
17 changed files with 256 additions and 44 deletions
+16
View File
@@ -0,0 +1,16 @@
from app.core.config import get_settings
def test_get_settings_returns_same_instance():
s1 = get_settings()
s2 = get_settings()
assert s1 is s2 # lru_cache should return same instance
def test_default_settings_values():
settings = get_settings()
assert settings.app_name == "URL Shortener"
assert settings.host == "0.0.0.0"
assert settings.port == 8000
assert settings.debug is True
assert isinstance(settings.allowed_hosts, list)