pytest-django icon indicating copy to clipboard operation
pytest-django copied to clipboard

enable_db_access_for_all_tests how to make it work for all databases in multi databases setup?

Open insspb opened this issue 4 years ago • 1 comments
trafficstars

I tried with markers in different places in conftest - nothing helps.

If markers in individual test files that do use second db - everything work.

If there is no markers in test file that use only main db - everything works in this test file.

insspb avatar Sep 10 '21 13:09 insspb

what I have found is that:

pytestmark = pytest.mark.django_db(databases='__all__') does not work. Using a full enumeration of the databases, e.g. databases=['default', 'logs'], so far seems to work.

bp100a avatar Nov 12 '21 19:11 bp100a