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']`
--
Ticket URL: <https://code.djangoproject.com/ticket/24293>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* 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>
Comment (by timgraham):
We might consider fixing this for 1.7, but I questioned whether or not we
need to ship tests with contrib apps in this
[https://groups.google.com/d/topic/django-
developers/nj_Zha341pA/discussion django-developers thread].
--
Ticket URL: <https://code.djangoproject.com/ticket/24293#comment:2>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"0c9e006d5fddfe470553d792e2ecee02f467f2a8"]:
{{{
#!CommitTicketReference repository=""
revision="0c9e006d5fddfe470553d792e2ecee02f467f2a8"
[1.7.x] Fixed #24293 -- Skipped a contrib.sites test if multiple databases
aren't setup.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24293#comment:3>