#16329: Django doesn't initialize two databases with the same name, port and
host
-------------------------------------+-------------------------------------
Reporter: canassa | Owner: nobody
Type: Bug | Status: new
Milestone: | Component: Testing framework
Version: SVN | Severity: Normal
Resolution: | Keywords:
Triage Stage: Design | Has patch: 0
decision needed | Needs tests: 0
Needs documentation: 0 | Easy pickings: 0
Patch needs improvement: 0 |
UI/UX: 0 |
-------------------------------------+-------------------------------------
Changes (by masj@…):
* version: 1.3 => SVN
Comment:
I've faced the same problem while running a test on the latest SVN.
A slave database with a 'TEST_MIRROR':'default' will create a dummy
connection.
What happens is that in django.test.testcases:
{{{
def connections_support_transactions():
"""
Returns True if all connections support transactions.
"""
return all(conn.features.supports_transactions for conn in
connections.all())
}}}
The above code looks for features.supports_transactions in each
connection. However, since the slave connection is a dummy connection that
just mirrors default, .supports_transactions for the slave connection
returns nothing.
This is causing tests to run without transaction support. Ideally what
connections_support_transactions() should do is resolve the dummy
connection to the correct database and then check the features of the real
connection.
--
Ticket URL: <https://code.djangoproject.com/ticket/16329#comment:3>
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.