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)
Change History (2)
by , 14 years ago
Attachment: | creation.py added |
---|
comment:1 by , 14 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
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.
hack for postgresql to allow choosing test database/username/password