"""Test GET /profile/uuid/ endpoint.""" import uuid import requests from tests.integration import config def test_get_profile_by_uuid(new_profile, grass_headers): """Test getting a profile by uuid.""" profile_uuid = new_profile['uuid'] res = requests.get( f'{config.QA_BASE_URL}/profile/uuid/{profile_uuid}', headers=grass_headers, ) assert res.status_code == 200 body = res.json() for key, value in new_profile.items(): assert body[key] == value def test_get_nonexistent_profile_by_uuid(grass_headers): """Test attempting to get a nonexistent profile by uuid.""" profile_uuid = uuid.uuid4() res = requests.get( f'{config.QA_BASE_URL}/profile/uuid/{profile_uuid}', headers=grass_headers, ) assert res.status_code == 404 body = res.json() assert body['code'] == 'not_found_error' assert body['message'] == 'Profile not found'