Search code examples
pythondjangounit-testingdjango-1.9enforcement

Launch django unittest with a new database


The question is in the title.

How can I run the unit tests with manage.py test from the command line without having to type yes if an old test database hasn't been destroyed(this happens when the tests are aborted).

thanks


Solution

  • Try using the --noinput option (--no-input is an alternative alias in Django 1.9+).

    ./manage.py test --noinput