Opened 6 years ago

Closed 6 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: UI/UX:


You can't run ./ 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) (20.1 KB) - added by mnbayazit 6 years ago.
hack for postgresql to allow choosing test database/username/password

Download all attachments as: .zip

Change History (2)

Changed 6 years ago by mnbayazit

Attachment: added

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

comment:1 Changed 6 years ago by Jacob

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
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