Changes between Initial Version and Version 1 of Ticket #33277
- Timestamp:
- Nov 10, 2021, 12:00:40 PM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #33277 – Description
initial v1 69 69 Given that the test DB names are not prefixed with {{{test_}}} with {{{SimpleTestCase}}} you might accidentally change the production DB from within your tests when something like a {{{ThreadPoolExecutor}}} is being used when mixing sync with async etc. 70 70 71 Note: pytest-django monkeypatches {{{django.db.backends.base.base.BaseDatabaseWrapper.ensure_connection}}} to block DB access, which appears to work better in this regard (across threads). 72 71 73 1: https://github.com/django/django/blob/dfa1145a22042dcf9e504a5a7edd5557e3e0d07c/django/utils/connection.py#L41 72 74 2: https://github.com/django/django/blob/dfa1145a22042dcf9e504a5a7edd5557e3e0d07c/django/test/testcases.py#L183