#14415: Multiple aliases for one database: testing problems
-------------------------------------+-------------------------------------
Reporter: shai | Owner: boaz85
Type: Uncategorized | Status: assigned
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: multidb, multiple | Triage Stage: Design
databases, multiple aliases | decision needed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by boaz85):
* status: new => assigned
* owner: nobody => boaz85
Comment:
Let's say you have two db's - "default" and "other".
In db "other" you have table x, which you don't have In db "default" (I
used db router to accomplish that).
During a test, you are trying to add a row to table x, only on db "other".
Let's assume this is your DATABASES setting:
{{{
DATABASES = {
'default': {
'NAME': 'some_name',
'ENGINE': 'django.db.backends.postgresql_psycopg2'',
'USER': ...,
'PASSWORD': ...
}
}
other = DATABASES['default'].copy()
other['TEST']['NAME'] = 'other_name'
DATABASES['other'] = other
}}}
Django will ignore
{{{
other['TEST']['NAME'] = 'other_name'
}}}
as long as you don't set
{{{
other['NAME']
}}}
to a value different from
{{{
DATABASES['default']['name']
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/14415#comment:19>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/062.c49cea686c5872ed1af6f06e76378ca1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.