Opened 10 years ago
Closed 10 years ago
#24293 closed Bug (fixed)
contrib.sites.tests.CreateDefaultSiteTests.test_multi_db expect "other" database to exist, but doesn't create one
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 )
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 (3)
comment:1 by , 10 years ago
Description: | modified (diff) |
---|
comment:2 by , 10 years ago
comment:3 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
We might consider fixing this for 1.7, but I questioned whether or not we need to ship tests with contrib apps in this django-developers thread.