#14287: TEST_MIRROR is not respected in routers
------------------------------------------+---------------------------------
Reporter: dcramer | Owner: nobody
Status: new | Milestone:
Component: Database layer (models, ORM) | Version: 1.2
Keywords: | Stage: Unreviewed
Has_patch: 0 |
------------------------------------------+---------------------------------
When using TEST_MIRROR to proxy database connections in the test
environment, the alias is not saved when calling syncdb (and possible
other) routines. This causes a problem when you're using routers and
checking db aliases.
Here's a quick example:
{{{
def allow_syncdb(self, db, model):
# analytics has TEST_MIRROR = 'default', so in tests, db is set to
'default' here
if model._meta.app_label == 'analytics' and db == 'analytics':
return True
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/14287>
Django <http://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.