Now, run the following command to create a test database, run all the migrations and use the Django nose test running to execute all the tests we created. The test runner will execute all the methods for our GameCategoryTests
class that start with the test_
prefix and will display the results.
Remember that we configured many default command-line options that will be used without the need to enter them in our command-line. Run the following command within the same virtual environment we have been using. We will use the -v 2
option to use the verbosity level 2 because we want to check all the things that the test runner is doing:
python manage.py test -v 2
The following lines show the sample output:
nosetests --with-coverage --cover-package=games --cover-erase --cover-inclusive -v --verbosity=2 Creating test database for alias 'default' ('test_games')...