Skip to Content
Building RESTful Python Web Services
book

Building RESTful Python Web Services

by Gastón C. Hillar
October 2016
Intermediate to advanced
418 pages
9h 52m
English
Packt Publishing
Content preview from Building RESTful Python Web Services

Running unit tests with nose2 and checking testing coverage

Now, run the following command to create all the necessary tables in our test database and use the nose2 test running to execute all the tests we created. The test runner will execute all the methods for our InitialTests 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 the test_messages database as our test database.

Remove the api.py file we created in the previous chapter from the api folder because we don't want the tests coverage to take into account this file. Go to the api folder and run the following command within the same virtual environment ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On RESTful Python Web Services - Second Edition

Hands-On RESTful Python Web Services - Second Edition

Gastón C. Hillar

Publisher Resources

ISBN: 9781786462251Supplemental Content