4 ms·
The most interesting part to me is that there is no database. It had never occurred to me to use Django without one.
by jlafon 13y ago
The most interesting part to me is that there is no database. It had never occurred to me to use Django without one.
- motter 13y agoIt's surprisingly easy, though I believe the tests expect one to be configured (I haven't checked precisely why, or if it can be configured not to expect a database).
- StavrosK 13y agoI just configure it with SQLite in those cases. You can probably even specify ":memory:" for the DB location.
- mazelife 13y agoIt can be configured not to expect a database. You just subclass the DjangoTestSuiteRunner to skip setting up and tearing down the DB, then set that as TEST_RUNNER. See here for an example: http://stackoverflow.com/questions/5917587/django-unit-tests-without-a-db#answer-7004517 http://stackoverflow.com/questions/5917587/django-unit-tests...