NASA-IMPACT / admg-backend

Apache License 2.0
2 stars 0 forks source link

Refactor test for doi generation #572

Open Tammo-Feldmann opened 11 months ago

Tammo-Feldmann commented 11 months ago

Describe the bug The doi generation test was loading a large fixture that interfered with subsequent tests. I am skipping this test and it needs to be rewritten in a different way that makes sure to clean up the test database after it runs.

To Reproduce You can go to the feature/canonical-mi-workflow, in test_doi_generation.py you can comment out line 95 which says '@pytest.mark.skip(reason="This fixture is breaking subsequent tests")'. This will re-enable the fixture loading and makes subsequent tests fail.

Expected behavior Tests should run independently without interfering with later tests. The test_doi_generation test should clean up after itself and ideally load only the data that is necessary for the test.