[Django]-How to automatically destroy django test database

107👍

Use –help to see the docs of the test command:

>>> ./manage.py test --help   
Usage: ./manage.py test [options] [appname ...]

Runs the test suite for the specified applications, or the entire site if no apps are specified.

[...]

--noinput             Tells Django to NOT prompt the user for input of any
                      kind.

And use –noinput which defaults to destroying the test db;)

👤jpic

Leave a comment