Test-Driven Development with Django

More Information
Learn
  • Codify user stories as browser-based tests to ensure their completion
  • Write isolated unit tests that not only confirm your application, but also explain it
  • Use the red-green-refactor TDD cycle to create and refine your code by changing tests first
  • Test integrations with external APIs by testing their documentation
  • Mock out calls to external services and internal functions
  • Explore the basics of documentation-driven API design
  • Other testing tools available in popular Python packages such as Django REST framework and VCR.py
About

Test-Driven Development (TDD) simplifies the trickiest of software tasks with its unique ability to peel back problems into layers. The testing tools available in Python and Django make test writing a joy, and the full coverage test suite that results from TDD is a boon to any project.

This guide to developing with Django takes a test-first approach: write a test, then write enough production code to get it to pass. You'll quickly get hands-on experience, writing tests for a database-driven application with the TDD methodology. Use this book to build the skills and habits that make testing a regular part of your workflow.

Features
  • Deliver feature-complete projects by encoding user stories and features in functional tests
  • Take a deep dive into browser-based testing with Selenium and Django's LiveServerTestCase
  • An example driven, comprehensive guide to exploring test-driven development techniques with Django
Page Count 186
Course Length 5 hours 34 minutes
ISBN 9781785281167
Date Of Publication 29 Jul 2015

Authors

Kevin Harvey

Kevin Harvey first fell in love with Django while living in Quelimane, Mozambique, in 2007. His professional interests include software quality, open source, and teaching. He continues to be amazed at the Python community's ability to turn a history major into a software engineer, a feat for which he will forever be indebted. When not writing unit tests, Kevin enjoys playing the bass (both electric and stand up), and cooking with entirely too much butter. He lives in Nashville, Tennessee, with his wife and their two sons.