- Categorized scripts into tests/unit/, tests/integration/, tests/e2e/, and tests/tools/. - Adopted consistent naming prefixes (test_unit_*, test_int_*, test_e2e_*, tool_*). - Renamed conftest_mock.py to mock_config_helper.py for clarity. - Updated test_int_boot_diagnosis.py with sys.path setup for root-level execution.
11 lines
273 B
Python
11 lines
273 B
Python
import sys
|
|
from unittest.mock import MagicMock
|
|
|
|
# Create a mock for app.config before any other app imports
|
|
mock_config = MagicMock()
|
|
mock_config.settings = MagicMock()
|
|
|
|
# Manually inject into sys.modules
|
|
sys.modules["app.config"] = mock_config
|
|
print("MOCKED: app.config")
|