What is the issue?
ENABLE_MYOPENCRE is imported as a plain boolean at module load time in web_main.py. Both /rest/v1/cre_csv and /rest/v1/cre_csv_import abort with 404 when it is False. The tests never patch this value, so both routes are permanently unreachable in the test environment and the CSV functionality has no test coverage.
Expected Behaviour
Both tests should reach the route handlers and validate the CSV functionality.
Actual Behaviour
AssertionError: 200 != 404 for both test_get_cre_csv and test_import_from_cre_csv.
Steps to reproduce
- Run the test suite: flask test
- Observe the failures on test_get_cre_csv and test_import_from_cre_csv in web_main_test.py
What is the issue?
ENABLE_MYOPENCRE is imported as a plain boolean at module load time in web_main.py. Both /rest/v1/cre_csv and /rest/v1/cre_csv_import abort with 404 when it is False. The tests never patch this value, so both routes are permanently unreachable in the test environment and the CSV functionality has no test coverage.
Expected Behaviour
Both tests should reach the route handlers and validate the CSV functionality.
Actual Behaviour
AssertionError: 200 != 404 for both test_get_cre_csv and test_import_from_cre_csv.
Steps to reproduce