Contribute Media
A thank you to everyone who makes this possible: Read More

Testing Best Practices (Tutorial)

Description

"Testing Best Practices (Tutorial)" by: Randy Syring We'll use a non-trivial Flask application to review general best practices when testing. In addition, we'll examine methods for testing an application when it must interact with services outside itself. In particular, we will review how to test:

Database Celery tasks 3rd party external APIs (REST/JSON) CLI commands Emails Using Continuous Integration (CI) services We will discuss both principles and implementation so that even if you don't use Flask, the principles learned can be applied to other frameworks (Django, etc.).

This is an intermediate to advanced talk so attendees should feel comfortable:

working in Python cloning repos from GitHub using pip and friends to create virtualenvs and install dependencies running applications from the command line using Docker and docker-compose to spin up external services (database, email, RabbitMQ) or having those services installed & available at the OS level familiarity with using pytest will be helpful

RESOURCES: https://2020.pythonwebconf.com/tutorials/testing-done-right

Recorded at the 2020 Python Web Conference (https://2020.pythonwebconf.com)

Details

Improve this page