Skip to content

Commit

Permalink
improve initial example
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabien Coelho committed Mar 12, 2024
1 parent 28b94c6 commit 96f4874
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ from FlaskTester import ft_authenticator, ft_client

@pytest.fixture
def api(ft_client):
# add test passwords for Calvin and Hobbes (must be consistent with app!)
ft_client.setPass("calvin", "clv-pass")
ft_client.setPass("hobbes", "hbs-pass")
# get Calvin's token, assume {"token": "<token-value>"}
res = ft_client.get("/token", login="calvin", auth="basic", status=200)
assert res.is_json
Expand Down

0 comments on commit 96f4874

Please sign in to comment.