#10868: _destroy_test_db exposes the production database to possibly destructive
actions from the unit tests
-------------------------------------+-------------------------------------
Reporter: ovidiu | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version:
Severity: Release blocker | Resolution:
Keywords: django.test | Triage Stage: Design
Has patch: 1 | decision needed
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by akaariai):
If leaving the connection settings such that new connections will be made
to the (non-existing) test database is considered backwards compatible
this should be the sanest solution. Anything else I can think of will end
up being an ugly hack.
I think the move of threading.local from `DatabaseWrapper` to
django.db.connections will make patching this easier. Just close the
connection to the databases, and you are free to alter the settings
dictionary of the thread's `DatabaseWrapper`. The changes will not be
visible to other threads.
This probably needs at least a mention in release notes.
--
Ticket URL: <https://code.djangoproject.com/ticket/10868#comment:16>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.