I’ve been running tests for a Flask app for a couple years now without incident. Suddenly today, the tests started failing because it is trying to run the development server as opposed to the test server. After a bit of debugging, it is clear that despite the environment variable for
FLASK_CONFIG being set correctly, it is trying to find the url for a MySQL database which is listed under the development server config.
How can I debug this further or figure out what is going on? Nothing has changed on my end that would affect this…
Config is as follows:
version: 2 jobs: build: working_directory: ~/repo docker: - image: circleci/python:3.5 environment: FLASK_CONFIG: testing steps: ... - run: name: run tests command: | . venv/bin/activate python3 manage.py test