inspire-next
inspire-next copied to clipboard
tests: reduce the number of application fixtures
Every application fixture is a spot in which we have to specify the application configuration, which has already led to (minor) divergences between configurations. Let's kill this before it becomes a problem by having exactly one application fixture per test suite.
If a test requires a certain configuration variable to be set, that should happen in the preamble of the test, not in the fixture.
- [x]
email_app
andapp
should be merged intest/unit/conftest.py
- [x]
small_app
andapp
should be merged intests/integration/conftest.py
- [ ]
workflow_app
fromtests/integration/test_arxiv_workflow.py
andapp
fromtests/integration/conftest.py
should be merged
Touching the difficulty up to hard, because merging small_app
and app
requires to change the scope of the fixture from function
to session
, which implies some careful work to avoid persisting modifications from one test to the other.
Commit https://github.com/inspirehep/inspire-next/commit/c97fb948a423a3ac9f09b50010863b19d85d1a13 introduced another application fixture (workflow_app
).