What is the issue?
test_tiered_execution_optimization in gap_analysis_db_test.py errors with ModuleNotFoundError because patch("application.config.Config.GAP_ANALYSIS_OPTIMIZED") treats Config as a submodule of application.config. Config is a class, not a subpackage, so the mock importer fails. The test can never run, leaving the tiered gap analysis optimization feature with no test coverage.
Expected Behaviour
The test should run and verify that Tier 3 is skipped when Tier 1 returns results.
Actual Behaviour
ModuleNotFoundError: No module named 'application.config.Config'; 'application.config' is not a package
Steps to reproduce
- Run the test suite: flask test
- Observe the error on test_tiered_execution_optimization in gap_analysis_db_test.py
What is the issue?
test_tiered_execution_optimization in gap_analysis_db_test.py errors with ModuleNotFoundError because patch("application.config.Config.GAP_ANALYSIS_OPTIMIZED") treats Config as a submodule of application.config. Config is a class, not a subpackage, so the mock importer fails. The test can never run, leaving the tiered gap analysis optimization feature with no test coverage.
Expected Behaviour
The test should run and verify that Tier 3 is skipped when Tier 1 returns results.
Actual Behaviour
ModuleNotFoundError: No module named 'application.config.Config'; 'application.config' is not a package
Steps to reproduce