#24293: contrib.sites.tests.CreateDefaultSiteTests.test_multi_db expect "other"
database to exist, but doesn't create one
-------------------------------+--------------------------------------
Reporter: teferi | Owner: nobody
Type: Bug | Status: new
Component: contrib.sites | Version: 1.7
Severity: Normal | Resolution:
Keywords: tests | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by teferi):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Old description:
> The bug is easily reproducible on a clean installation of django 1.7.3+
> via `./manage.py test django.contrib.sites`
>
> The problem is within the test `CreateDefaultSiteTests.test_multi_db`.
> The line that fails is
> {{{
> create_default_site(self.app_config, using='other', verbosity=0)
> }}}
> . It would fail unless you have "other" database defined in DATABASES
> dict in settings. I guess the test should ensure, that "other" DATABASE
> exists before querying it. At least by setting `DATABASES['other'] =
> DATABASES['default']`
New description:
The bug is easily reproducible on a clean installation of django 1.7.3+
via `./manage.py test django.contrib.sites`
The problem is within the test `CreateDefaultSiteTests.test_multi_db`. The
line that fails is
{{{
create_default_site(self.app_config, using='other', verbosity=0)
}}}
. It would fail unless you have "other" database defined in DATABASES dict
in settings.
The exception raised is `ConnectionDoesNotExist: The connection other
doesn't exist`
I guess the test should ensure, that "other" DATABASE exists before
querying it. At least by setting `DATABASES['other'] =
DATABASES['default']`
--
--
Ticket URL: <https://code.djangoproject.com/ticket/24293#comment:1>
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/064.9a633399d1a87c775ce071ce00d0360b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.