Last active
September 15, 2021 12:45
-
-
Save samkit-jain/922c8e3317e521a534d8501309701675 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_sign_up_01(client): | |
# Sign up a user by testing the ``POST /signup/`` API endpoint. | |
response = client.post( | |
"/signup/", | |
json={"username": "username", "password": "password"}, | |
) | |
assert response.status_code == 200 | |
assert response.json == {"message": "Registration successful"} | |
# If you want to go an extra step, can also check if the entry was created | |
# in the database or not. But, that is optional as you can verify the same | |
# in the signin API test. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment