"""Tests for label participant handlers.""" import json from http.client import BAD_REQUEST import pytest mock_participant_response = { 'name': 'L.G. Wise', 'vendorId': 8759, 'subaccountId': 0, 'spotifyId': '5xaT2601i5MC4h6yZa7EOD', 'id': 786281, 'appleMusicId': 111000530, } @pytest.mark.parametrize( ( 'test_description', 'label_participant_id', 'expected_response_status', 'expected_response_json', ), [ ( 'Test lable participant get by id with bad id.', '123something', BAD_REQUEST, { 'code': 400, 'message': "Oopsies, I don't know how to respond to that ¯\\_(ツ)_/¯", }, ), ], ) def test_get_label_participant_by_id( test_description, label_participant_id, expected_response_status, expected_response_json, mocker, test_client, ): """Test participant get by id.""" handler_response = test_client.get(f'/label-participants/{label_participant_id}') result = json.loads(handler_response.data.decode()) assert handler_response.status_code == expected_response_status assert result == expected_response_json