Skip to content

Instantly share code, notes, and snippets.

@samkit-jain
Last active September 15, 2021 12:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samkit-jain/9d0da534d806c30490f48d8d520a781d to your computer and use it in GitHub Desktop.
Save samkit-jain/9d0da534d806c30490f48d8d520a781d to your computer and use it in GitHub Desktop.
def test_sign_in_01(client):
# Sign in a user by testing the ``POST /signin/`` API endpoint.
# Uisng the same user as created in the ``test_sign_up_01()`` test.
response = client.post(
"/signin/",
json={"username": "username", "password": "password"},
)
assert response.status_code == 200
assert response.json == {"message": "Logged in"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment