Skip to content

ga-curriculum/python-fastapi-unit-testing-with-pytest

Repository files navigation

Python FastAPI Unit Testing with Pytest

About

In this module, you will follow a step-by-step walkthrough where you'll learn how to set up a Pytest testing environment for a FastAPI CRUD app. We'll discuss and download dependencies, create configuration files and write unit tests to validate several endpoints of your RESTful API.

Content

Lesson Est. Delivery Time Skills
Setup 5 min Set up the development environment.
Concepts 10 min Understand the purpose and core features of the Python Pytest library, including installation and basic usage.
Preparing the Pytest Testing Environment 15 min Prepare and configure a testing environment for Pytest, including setting up the necessary configurations for testing FastAPI APIs.
Writing Unit Tests 20 min Write unit tests to validate FastAPI endpoints, using Pytest for testing and debugging the API's functionality.
Total content 50 min

References

📖 Reference Materials

Internal

Prerequisites

  • Python FastAPI Serializers and Controllers
  • Python FastAPI Authentication
  • Python FastAPI Authorization

Starter code

🟢 Starter code

Solution code

🏁 Solution code

Course landing pages

Resources

✏️ Instructor Guide

🎥 Video Hub

🏗️ Release Notes


Find a 👾 bug 👾 or have suggestions? Let us know!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors