Company
Date Published
Author
Ersel Aker
Word count
2054
Language
English
Hacker News points
None

Summary

The tutorial covers how to use Python's mock and httpretty libraries to test Django app parts that communicate with external services. It uses a simple Django app called "Hacker News Hotline" to fetch today's headlines from Hacker News and serve them behind a TwiML endpoint, allowing anyone calling the Twilio number to hear the latest headlines on Hacker News. The tutorial also introduces Django's RequestFactory class and how it can be used to test Django views without making actual HTTP requests.