8 Testing your project
This chapter covers
- Reasons to write automated tests
- Writing and running unit tests in Django
- Authenticating a user during a test
- Posting data and uploading files during a test
How do you know that a change in your code isn’t going to break existing functionality? Automated testing is the answer. This chapter shows you how to write tests to check that your project continues to work even while you’re making changes and adding features.
8.1 Automated testing
If you’ve been coding along as you’ve been reading, you have written more than 20 views and likely have over a thousand lines of code. It doesn’t take long before manually testing everything in your project becomes a time-consuming endeavor. This becomes more ...
Get Django in Action 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.