Skip to content

Commit 57d3e6f

Browse files
RayBBCopilot
andauthored
Update openlibrary/conftest.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent ffc669e commit 57d3e6f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

openlibrary/conftest.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,14 @@ def test_foo(monkeytime):
4848

4949
@pytest.fixture(autouse=True)
5050
def setup_db_config():
51-
"""Set up empty database configuration for all tests to prevent db_parameters errors."""
51+
"""
52+
Set up empty database configuration for all tests to prevent db_parameters errors.
53+
54+
This fixture is required for tests that use `create_site()` calls, especially when setting up
55+
context variables. It ensures that the database configuration is stubbed out, which is necessary
56+
for the context variable infrastructure being added. Without this, tests may fail due to missing
57+
or incorrect database parameters when initializing site contexts.
58+
"""
5259
import web
5360

5461
from infogami import config

0 commit comments

Comments
 (0)