blob: 337b99997a3dcd11ee8b7d4ecc51e7a1edb9c84d (
plain)
1
2
3
4
5
6
7
8
9
10
|
from requests import post, codes
from test_settings import TEST_REST_URL, TEST_REST_GET_ACCESS_TOKEN_ENDPOINT, TEST_REST_HEADERS
def test_get_auth_token(auth_credentials):
url = f"{TEST_REST_URL}{TEST_REST_GET_ACCESS_TOKEN_ENDPOINT}"
response = post(url, headers=TEST_REST_HEADERS, verify=False, json=auth_credentials[0])
json_response = response.json()
assert "accessToken" in json_response
assert "expires" in json_response
assert response.status_code == codes.created
|