#22811 closed Cleanup/optimization (fixed)
Cannot create a settings file that uses both old and new TEST database settings
| Reported by: | Tim Graham | Owned by: | Tim Graham |
|---|---|---|---|
| Component: | Testing framework | Version: | 1.7-beta-2 |
| Severity: | Release blocker | Keywords: | |
| Cc: | Shai Berger | Triage Stage: | Unreviewed |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
I'd like to use the following settings on the continuous integration server, but an ImproperlyConfigured("Connection default has both NAME and TEST[NAME] specified.") exception is currently raised.
# Django <= 1.6
'TEST_NAME': 'test_django_gis_%s_%s' % (PY_VERSION, BUILD_NAME),
# Django 1.7+
'TEST': {
'NAME': 'test_django_gis_%s_%s' % (PY_VERSION, BUILD_NAME),
},
I think third-party apps that use multiple versions of Django will also run into this and the need to create a separate settings file seems overkill.
It may be a good idea to remove this constraint and to use simply use TEST if defined, ignoring the TEST_* values in that case (without warnings so it's possible to silence them).
Change History (5)
comment:1 by , 11 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:3 by , 11 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Shai agreed we can relax this and throw an error only if
TESTandTEST_*differ.