Opened 15 years ago

Closed 14 years ago

#9940 closed (fixed)

Pass DATABASE_OPTIONS to regressiontests/admin_scripts tests

Reported by: Ramiro Morales Owned by: Ramiro Morales
Component: Testing framework Version: dev
Severity: Keywords: regressiontests admin_scripts DATABASE_OPTIONS
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The tests in tests/regressiontests/admin_scripts involve the creation of a number of settings files. Currently, only the values of the DATABASE_ENGINE, DATABASE_NAME, DATABASE_USER, DATABASE_PASSWORD, DATABASE_HOST, DATABASE_PORT and ROOT_URLCONF settings are copied from the user-provided settings.

The DB backends included with Django don't need additional settings to be able to run such tests under a complete DB environment but for other (external) backends some additional information might be needed.

In the case of django-pyodbc, historically DATABASE_ODBC_DRIVER and DATABASE_ODBC_DSN have been examples of such settings (they allow to configure some ODBC-related values). Providing default values for them in the backend isn't a always a complete solution and asking Django to preserve their values is out of question because it would be non-generic. What could be done instead is: a) ask for the DATABASE_OPTIONS setting to be preserved (that's what this ticket is all about) and b) in the backend side: Gradually migrate these settings to DATABASE_OPTIONS.

Attachments (1)

t9940-r9690.diff (441 bytes ) - added by Ramiro Morales 15 years ago.

Download all attachments as: .zip

Change History (5)

by Ramiro Morales, 15 years ago

Attachment: t9940-r9690.diff added

comment:1 by Ramiro Morales, 15 years ago

Has patch: set

comment:2 by Ramiro Morales, 15 years ago

Owner: changed from nobody to Ramiro Morales

comment:3 by Eric Holscher, 15 years ago

Triage Stage: UnreviewedAccepted

Makes sense. Marking as accepted.

comment:4 by Ramiro Morales, 14 years ago

Resolution: fixed
Status: newclosed

Fixed in r11952.

Note: See TracTickets for help on using tickets.
Back to Top