Created
December 9, 2023 12:10
-
-
Save PramodDutta/105628f9f05a6ec2279f9cfce4556568 to your computer and use it in GitHub Desktop.
test_create_token.py
This file contains 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
import pytest | |
import requests | |
@pytest.mark.token | |
def test_post_create_token(): | |
payload = { | |
"username": "admin", | |
"password": "password123" | |
} | |
headers = { | |
"Content-Type": "application/json", | |
} | |
response = requests.post("https://restful-booker.herokuapp.com/auth", headers=headers, json=payload) | |
print(response.status_code) | |
print(response.text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment