Categories
Python Tutorial

Testing Your Django App With pytest : A Beginner’s Guide (Part 2)

We have covered installation and how to configure the Django project for the pytest in the previous blog post. Today we will learn how to write tests with pytest for a Django project with some basic examples. We are going to write tests for: models views and forms Project Structure We are going to test […]

Categories
Python Tutorial

Testing Your Django App With pytest : A Beginner’s Guide (Part 1)

“Testing leads to failure, and failure leads to understanding.” – Burt Rutan You may have heard of and used unit testing to test your projects with Python and Django unittest module. But pytest suggests much more pythonic tests without boilerplate. pytest is a very mature testing tool for testing Python and Django based projects. Let’s […]