File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 11import importlib
22
33import pytest
4- from gs .backend .config import config
4+ from gs .backend .config . config import BackendConfiguration , settings
55from gs .backend .config .cors_config import CORSConfig
66from gs .backend .config .database_config import DatabaseConfig
77from gs .backend .config .logger_config import LoggerConfig
@@ -37,8 +37,7 @@ def test_backend_configuration_from_env(monkeypatch):
3737 monkeypatch .setenv ("GS_DATABASE_PORT" , "5432" )
3838 monkeypatch .setenv ("GS_DATABASE_NAME" , "testdb" )
3939
40- importlib .reload (config )
41- cfg = config .settings
40+ cfg = BackendConfiguration ()
4241
4342 assert "/test" in cfg .logger .excluded_endpoints
4443 assert "http://localhost:5173" in cfg .cors .allow_origins
@@ -50,7 +49,7 @@ def test_backend_configuration_from_env(monkeypatch):
5049
5150
5251def test_database_connection_string ():
53- db = config . settings .db
52+ db = settings .db
5453
5554 assert db .password .get_secret_value () == "testpassword"
5655 expected_url = "postgresql://testuser:testpassword@localhost:5432/testdb"
You can’t perform that action at this time.
0 commit comments