Unable to test a non-db dependent django app without db configuration
|Reported by:||Prabhu Subramanian <prabhu.subramanian@…>||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
We are able to write django applications that do not require database configurations. But when we test them using django test framework, the framework expects database configurations. Otherwise we get the below error.
raise ImproperlyConfigured, "You haven't set the DATABASE_ENGINE setting yet."
django.core.exceptions.ImproperlyConfigured: You haven't set the DATABASE_ENGINE setting yet.
A workaround is to specify sqlite3 and let the test framework create in-memory database. But I don't think this is a good solution.
Change History (4)
comment:1 Changed 6 years ago by kmtracey
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset