Skip to content

Commit bf69c8c

Browse files
committed
refactor: update test configuration to use get_settings() method
1 parent d14530b commit bf69c8c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

app/tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
from app.core.factory import create_app
1414
from app.resource_adapters.persistence.sqlmodel.database import get_engine
1515
from app.resource_adapters.persistence.sqlmodel.issues import Issue
16-
from config import Settings
16+
from config import Settings, get_settings
1717

1818
# Specify the custom .env file
1919
dotenv_path = Path(".env.testing")
2020
load_dotenv(dotenv_path=dotenv_path, override=True)
2121

2222

23-
settings = Settings()
23+
settings = get_settings()
2424

2525

2626
def pytest_unconfigure(config: Config) -> None:

app/tests/test_main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
from main import app
55

6+
from .conftest import settings
7+
68

79
@pytest.fixture(name="client")
810
def client_fixture():
@@ -56,5 +58,5 @@ def test_is_configured():
5658
from main import is_configured
5759

5860
assert (
59-
is_configured() is True
61+
is_configured(settings) is True
6062
) # Should be True since project_name is set to "python-template"

0 commit comments

Comments
 (0)