App context leak for pdf generation tests
The flask app context is not present for tests/test_pdf_generation.py::test_generate_datamatrix
, which can result in a failure of the test.
The test only fails if it is run separately or as the first test. This means two things:
- We should supply this test with an app context
- We are leaking the app context somewhere
This first thing is easy to fix by passing the config_app
fixture. However, the second problem is more serious and not an easy fix. We will have to investigate how and where the app context is leaked and how to prevent it.