Getting Started With Testing in Flask

preview_player
Показать описание
In this video I introduce integration testing a Flask app. You'll learn how to use the test client and how to mock API requests inside a test among other things.

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

Thanks Anthony - glad you are still creating Flask / Python videos.

karlduckett
Автор

Thank you! You are an AMAZING teacher!!!

rastaricky
Автор

Thanks Anthony, very helpful and informative :)

biswajit-k
Автор

Thank you! I'm not sure what do you use to login, but I really wanted to know how to test the login/logout behavior

walkdead
Автор

One strange thing: it seems the login form does not have an CSRF token. I think it's oversimplified here due to lack of the token. How do you test login and register if the login form in login.html has this token?

zhengliu
Автор

This is super helpful! How do you clean the database everytime you finished testing though? I found the memory sqlite always keeping data

JayZhang-hflu
Автор

Do you have a video where you made the app? I can't get it to run.

jaredbarber
Автор

Thank you man, you are the python man

luisleon
Автор

Thanks for vid! Have a question... Lets say flask app is dockerized. Uses rq worker, redis, postgres as compose services. How should one thing about testing such application?

yomajo
Автор

so far I have got that tests are made to test a functionality. Do tests need to always pass or always fail??

alexanderantonio
Автор

So this is doing tests against an in memory database vs mocking… is there a guideline for this?

cantis
Автор

Can we have a comman database for all the test.
For example if i want to test comment functionality
Wherein user 1 adds a post and user 2 comments in it

Not sure if that would be possible in this type where database is created for every test.

drac
Автор

Really wish you'd mentioned it was Mac only up front

GraemeMeyer
welcome to shbcf.ru