Running unit tests and checking testing coverage
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.
Tip
The tests won't make changes to the database we have been using when working on the API.
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 ...
Get Building RESTful Python Web Services now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.