© Ben Lopatin 2020
B. LopatinDjango Standalone Appshttps://doi.org/10.1007/978-1-4842-5632-9_3

3. Testing

Ben Lopatin1 
(1)
New York, NY, USA
 

Tests ensure that our code does what we expect it to do. They also ensure that changes to the codebase don’t break something unexpected, and they signal to other users of our app that they can depend on the code.

In this chapter, you’ll learn exactly how tests provide value in a standalone Django app, how to run your app’s tests outside of a Django project, how to test more complicated multi-app relationships, how to include your tests, and also whether or not you need to configure Django in order to test your app.

Why test?

Everyone says that you should test. It sounds obvious - if testing is good, we should do ...

Get Django Standalone Apps: Learn to Develop Reusable Django Libraries 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.