A test is not a unit test if: It talks to the database It communicates across the network It touches the file system It can't run at the same time as any of your other unit tests You have to do special things to your environment (such as editing config files) to run it.
First off, this is a nice video. It clearly looks like you have the code in the notepad(Screen-2) and you are just typing it out on Screen-1. you have write it from scratch then it will make sense.
I don't that really matters, as long as he doesn't make a lot of mistakes. But he could have done all the code in one single function, no need to create 3 with the same content
I am building a restAPI using flask to call by myself. What is the need for unittesting when I am the one calling the API (meaning I will put correct inputs, datatypes, etc...)?
A test is not a unit test if:
It talks to the database
It communicates across the network
It touches the file system
It can't run at the same time as any of your other unit tests
You have to do special things to your environment (such as editing config files) to run it.
yep, that was an integration test in the video
Nice video - love Flask! Great tutorial - easy to follow, please type slower with a quieter keyboard :)
First off, this is a nice video. It clearly looks like you have the code in the notepad(Screen-2) and you are just typing it out on Screen-1. you have write it from scratch then it will make sense.
I don't that really matters, as long as he doesn't make a lot of mistakes. But he could have done all the code in one single function, no need to create 3 with the same content
This was exactly what I needed. Thank you so much.
same here!
Really helpful! Thanks for making this!
Really helpful and easy to understand! Thank you!
Thanks for the tutorial sir. Works work and exactly what I was looking for to 'getting started' with my unit testing in Flask. Have a good day.
Great
Simple and very helpful! Congratulations!
Very helpful!!
Don't mean to be rude or anything but why are you using try catch for the imports ? I mean you get a specific error for each import issue either way
bro, you are amazing!
Dude, are you trying to kill the space button?
Bro..also if we do crud operations...can u explain how to perform unit testing for crud operations in Flaskapi where as student database created in it
Sir, do you have the GitHub repository in the video? Thanks
I get this error.. "AssertionError: 'text/html; charset=utf-8' != 'application/json'" any idea why ??
user follow_redirects=True in response. You want to get to the response of the server, to get you json content.
Nice video, i have a doubt , why dont use Flask_testing? is deprecated ? or unittest is more solid?
can we write the same without using classes?/
that poor keyboard taking a shit ton of abuse
Super good wow amazing job
Thanks for amazing video. where is /fo route? so if I have only one route say /predict in my flask code would be `response = tester.get("/predict")`?
depends, if its a post request or get request and if you need to send some data you'll need to use requests library
😍
Does way to this unit test follow DevOps?
This way you will deploy both you app and your test which is not good
Really good guide, 99% like.
+1% if you share an example on git and pin to video)
youre lit bro
I am building a restAPI using flask to call by myself. What is the need for unittesting when I am the one calling the API (meaning I will put correct inputs, datatypes, etc...)?
can anyone tell me where does this test_client came from in the test line number 13 at time 4 minutes 10 second
very good
can anyone tell me where does this test_client came from in the test line number 13 at time 4 minutes 10 second