Conversation
tests/conftest.py
Outdated
There was a problem hiding this comment.
Why has this fixture been put here? Usually we try to keep all the fixtures in mavis.test.fixtures.
There was a problem hiding this comment.
This is a test fixture and is used by tests in two modules:
test_import_offline_vaccinations.py
test_national_reporting.py
There was a problem hiding this comment.
Yeah that makes sense. To avoid the conftest.py file getting too big, we've put shared fixtures in the mavis.test.fixtures module so they are better organised.
Here's an example one for national reporting:
manage-vaccinations-in-schools-testing/mavis/test/fixtures/data_models.py
Lines 145 to 160 in 2cf889a
There was a problem hiding this comment.
I'm not sure data_models.py is the best place for this fixture. The fixtures there deal with data, not pages and navigation. Maybe helpers.py would be better, or some other place (perhaps even a new file).
There was a problem hiding this comment.
That's what I had thought and created conftest.
There was a problem hiding this comment.
I think in principle the fact that you created a new file wasn't a problem, but that it wasn't in the fixtures/ directory. Though looking at what else is in fixtures/helpers.py, I think it would be fine to simply put it there.
Added test for https://nhsd-jira.digital.nhs.uk/browse/MAV-3408 with multiple duplicate vaccs records and one unique record.