-
Notifications
You must be signed in to change notification settings - Fork 347
pytest.mark.django_db does not isolate tests #461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Is the |
Yes, it is routed. I changed the testing settings to use one and only 'default' database, removed routing, and isolation started to work. It seems like both for django testrunner and pytest runner problem is at using multiple databases. |
You need to enable |
Closing this since it is a multi_db problem, see the referenced issue above. Feel free to comment/reopen this issue if I misunderstood it! |
pytest version 3.0.6
pytest-django-3.1.2
django-1.10
settings:
tests:
Running tests fails with IntegrityError.
After running created objects remain in database.
The text was updated successfully, but these errors were encountered: