FastAPI testing | Pytest and TestClient demonstration

preview_player
Показать описание
A demonstration of the FastAPI testing examples and some tips on what aspects of Pytest to look at if you are new to Pytest, and a good book to check out. *Note x-auth-token just happens to feature in the example being tested, it is NOT required in any way to use TestClient with Pytest.

📍 Check out these amazing FastAPI courses 📍

If you want a fast VPS server with Python installed check out :

See also:

Python Testing with pytest,
Second Edition
Simple, Rapid, Effective, and Scalable
by Brian Okken

If you want to learn about fixtures then this is a good link as well:

-- chapters --
00:00 Introduction (x-auth-token)
01:48 import TestClient
09:30 Union (pre Python 3.10)
12:45 Other Pytest features to learn if you are starting with Pytest
16:25 Python Testing with pytest

◼️ Coupon Code: DRPI10
(You can also get started with 5000 free API calls. No credit card required.)

👍 Become a patron 👍

Buy Dr Pi a coffee (or Tea)

Proxies
=================================================
If you need a good, easy to use proxy, I was recommended this one, and having used ScraperAPI for a while I can vouch for them. If you were going to sign up anyway, then maybe you would be kind enough to use the link and the coupon code below?

You can also do a full working trial first as well, (unlike some other companies). The trial doesn't ask for any payment details either so all good! 👍

◼️ Coupon Code: DRPI10

Thumbs up yeah? (cos Algos..)

#pytest #fastapi #python
Рекомендации по теме
Комментарии
Автор

Small correction, FastAPI is an ASGI framework, everything will be handled asynchronously behind the scenes regardless of how you define your CRUD method functions.

NikolaiDimitrov-ezot
Автор

book recommendation really helpful...thanks

karunnair
Автор

bro lives in heaven 💀
why there is so much light?

paimon
join shbcf.ru