Opened 14 years ago

Closed 14 years ago

#14001 closed (wontfix)

Can't use testing w/out having db creation privileges

Reported by: mnbayazit Owned by: nobody
Component: Testing framework Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

You can't run ./manage.py test unless you have CREATE DATABASE privileges. This kind of sucks if you're on a shared server and you can only create databases thru the admin panel, or you're only alloted a few. There's really no reason Django shouldn't allow you to choose one of these manually created databases; then instead of dropping the whole DB after running all the tests, you can just drop the tables.

I'm submitting a patch to show how it can be done, but this is a hack specifically for PostgreSQL.

Attachments (1)

creation.py (20.1 KB ) - added by mnbayazit 14 years ago.
hack for postgresql to allow choosing test database/username/password

Download all attachments as: .zip

Change History (2)

by mnbayazit, 14 years ago

Attachment: creation.py added

hack for postgresql to allow choosing test database/username/password

comment:1 by Jacob, 14 years ago

Resolution: wontfix
Status: newclosed

This is an assumption we need to make to make testing predictable and stable. If it's an assumption that breaks for you, you should look into writing a custom test runner.

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