Relative Content

Tag Archive for pythonflaskpytest

Writing pytest with JWT token in class

I have a class TestSecured and in it I have methods that will get endpoint that are protected so you need a jwt to make a request. I am trying to optimize my test class so that I don’t need to do the login process 3 times but only 1 and use the same token in my 3 tests method.

Test flask factory with SQLAlchemy

I am trying to build API in python with Flask. I was following Flask tutorial with the difference that I am using SQLAlchemy with sqlite db.