Opened 10 years ago

Last modified 10 years ago

#24293 closed Bug

contrib.sites.tests.CreateDefaultSiteTests.test_multi_db expect "other" database to exist, but doesn't create one — at Version 1

Reported by: k.zaitsev Owned by: nobody
Component: contrib.sites Version: 1.7
Severity: Normal Keywords: tests
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by k.zaitsev)

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']

Change History (1)

comment:1 by k.zaitsev, 10 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top