incomplete docs for running Django's own unit tests
|Reported by:||akaihola||Owned by:||akaihola|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
At http://www.djangoproject.com/documentation/contributing/#unit-tests under the title "Running the unit tests", the documentation states:
Yes, the unit tests need a settings module, but only for database connection info, with the DATABASE_ENGINE setting. You will also need a ROOT_URLCONF setting (its value is ignored; it just needs to be present) and a SITE_ID setting (any non-zero integer value will do) in order for all the tests to pass. The unit tests will not touch your existing databases; they create a new database, called django_test_db, which is deleted when the tests are finished. This means your user account needs permission to execute CREATE DATABASE.
For SQLite the above is true, but for at least PostgreSQL also DATABASE_NAME and DATABASE_USER need to be specified, and DATABASE_NAME must be the name of an existing database to which the user has access, but it *must not* be django_test_db.
Change History (8)
comment:1 Changed 8 years ago by Simon G. <dev@…>
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted
comment:2 Changed 8 years ago by akaihola
- Owner changed from nobody to akaihola
- Status changed from new to assigned