Write Python unit tests | Flask API Testing using unittest and requests

preview_player
Показать описание
In this 20-min video, we will start with writing a simple unit-test for an addition function using unittest standard library and then use the same concept and build upon it to write tests for the Flask API. The Books API implements CRUD : Create, Retrieve, Update and Delete and all operations will be tested using Python requests module.

- TIMESTAMPS -
00:00 Why API Testing
00:41 Python unittest quickstart
03:10 Guide to using Visual Studio Code "Test Explorer" Extension
05:20 Books API Walkthrough
08:22 Flask API Testing
20:40 Special unittest decorators

If you have suggestions as to how to improve this video, please use the comment section and let me know.
Рекомендации по теме
Комментарии
Автор

A great video - Thanks for covering a complex topic with such simplicity. Good job

garimasood
Автор

I am a beginner python and flask url but your instructions were easy and detailed enough for me to follow. Thanks!

anu.pandey
Автор

worked in a brilliant manner. thumbs up

ikramullahmohmand
Автор

Good work- Enjoyed this video and thanks for covering this topic.

kartiksaxena
Автор

is it actually updating and deleting records from the database? if. yes, it's a functional test not a unit test

saswatsahoo
Автор

Hi, I keep getting the error: r =requests.get(ApiTest.url) NameError: 'requests' is not defined. I am testing on a heroku deployed url

ErikBurdett