inspire-next icon indicating copy to clipboard operation
inspire-next copied to clipboard

tests: reduce the number of application fixtures

Open jacquerie opened this issue 8 years ago • 2 comments

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 and app should be merged in test/unit/conftest.py
  • [x] small_app and app should be merged in tests/integration/conftest.py
  • [ ] workflow_app from tests/integration/test_arxiv_workflow.py and app from tests/integration/conftest.py should be merged

jacquerie avatar Jan 06 '17 13:01 jacquerie

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.

jacquerie avatar Feb 05 '17 18:02 jacquerie

Commit https://github.com/inspirehep/inspire-next/commit/c97fb948a423a3ac9f09b50010863b19d85d1a13 introduced another application fixture (workflow_app).

jacquerie avatar Mar 30 '17 08:03 jacquerie