Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

LinkedIn Learning

Unit Testing in Django

via LinkedIn Learning

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore some of the tools you can use to test your Django application and some good practices for creating tests using Pytest.

Syllabus

Introduction
  • Unit test with Django
  • Why tests matter
1. Welcome to pytest
  • What is pytest?
  • Setting up pytest on Django
  • Building your first unit test
  • Getting familiar with pytest output
  • Where should tests live?
2. pytest and Django
  • Testing a GET endpoint
  • How to test the behavior when a user is authenticated
  • A bit more on the beauty of pytest
  • Being mindful of your test suite
  • Testing the list endpoint
  • Have you tested enough?
3. Being Lazy Is an Advantage
  • Being lazy: pytest fixtures
  • One step beyond the laziness
  • Lazy notes make your tests even smarter
4. Going Beyond
  • Testing the Create endpoint
  • Test is culture
Conclusion
  • Learn more

Taught by

Leticia Portella

Reviews

4.9 rating at LinkedIn Learning based on 57 ratings

Start your review of Unit Testing in Django

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.