Opened 15 years ago
Closed 15 years ago
#12122 closed (wontfix)
don't create test database on ./manage.py test
Reported by: | Exe | Owned by: | nobody |
---|---|---|---|
Component: | Testing framework | Version: | 1.1 |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Hello!
./manage.py tries to create database even if it's exists!
I don't want such behavior as I don't want to grant database creation to my users.
So I can propose solution:
do not create database if it's exist. Instead drop all tables in it.
Note:
See TracTickets
for help on using tickets.
What you propose sounds like extremely dangerous behavior to exist as a default. If a database already exists, then there's a reasonable chance that it could contain useful data. If the default behavior of the test suite is to purge the contents of a database, it would be very easy to accidentally lose that data through the simple act of running a test suite.
If you don't like Django's default test setup/teardown procedure, it is configurable - see the documentation on writing a custom test runner.