Hacker News new | ask | show | jobs
by motter 4498 days ago
It'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).
2 comments

It 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...
I just configure it with SQLite in those cases. You can probably even specify ":memory:" for the DB location.