"""Integration tests.""" import requests from tests.integration.config import QA_BASE_URL def test_apple_music_artist(): """Get service/apple-music/artist Endpoint.""" response = requests.get( f'{QA_BASE_URL}/service/apple-music/artist/508300942', ) assert response.status_code == 200, '\nReason: {}\nURL: {}'.format( response.reason, response.url ) response_body = response.json() assert response_body assert 'identifier' in response_body assert 'name' in response_body assert response_body['name'] == 'Charlotte Haining' def test_spotify_search(): """Get service/spotify/artist Endpoint.""" response = requests.get( f'{QA_BASE_URL}/service/spotify/artist/2XRjIwgD0UiJXtx7Xzfy7w', ) assert response.status_code == 200, '\nReason: {}\nURL: {}'.format( response.reason, response.url ) response_body = response.json() assert response_body assert 'identifier' in response_body assert 'name' in response_body assert response_body['name'] == 'Charlotte Haining'