Writing TestCase and assertions
Test models and views automatically.
Why Write Tests?
Tests catch bugs before your users do. They let you change code with confidence, knowing a green run means nothing broke. ✅
Meet TestCase
Django gives you a TestCase base class. Subclass it and each method that starts with test_ becomes an automatic check.
from django.test import TestCaseAll lessons in this course
- The Paginator Class
- Page Controls in ListView
- Writing TestCase and assertions
- The Test Client and Fixtures