Skip to content

conftest: use pytest-postgresql for django related tests

Replace the (non-working) django init hook by overloaded django_db_setup and make this django_db_setup use pytest-postgresql so we do not depend on external test environment (running postgresql server, tox or hand managed pifpaf).

Also make tests run with a proper scheduler so the scheduler interaction code is executed.

Note that this does not test for correctness in these interactions yet.

also move tests/init.py content in tests/conftest.py and adapt test code accordingly.

This also ensures retries_left is set otherwise tests may fail when using the local sheduler.


Migrated from D2474 (view on Phabricator)

Merge request reports

Loading