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

YouTube

Django Testing on Steroid - pytest + Hypothesis

EuroPython Conference via YouTube

Overview

Explore advanced Django testing techniques in this EuroPython 2020 conference talk. Learn how to leverage pytest and Hypothesis to enhance your test suite, focusing on a simple Django project. Discover the power of test parametrization and parallelization with pytest, then delve into extending tests using Hypothesis. Uncover strategies for detecting edge cases, improving test coverage, and potentially applying these techniques to Django models. Gain insights into defining test cases, applying tests to existing codebases, and using Hypothesis for model testing. Suitable for developers with some knowledge of pytest test parametrization, this talk aims to provide value to listeners of all skill levels.

Syllabus

Intro
Welcome
Who am I
Agenda
Overview
Example
Good Practices
Example Endpoint
Simple test
Validation
pytest parameterize
pytest results
Hypothesis
Testing invalid cases
Questions
Hypothesis decorator
pytest vs piunit
how to define the number of cases
applying tests to existing codebase
Hypothesis for jungle models
More questions
Hypothesis catching errors

Taught by

EuroPython Conference

Reviews

Start your review of Django Testing on Steroid - pytest + Hypothesis

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.