def test_api_read_error(api_error): '''Test error output from API.''' with pytest.raises(APIError): API.read(api_error)
def test_api_read_invalid(api_empty_data_response): '''Test error if response no valid data.''' with pytest.raises(APIReponseError): API.read(api_empty_data_response)
def test_api_read_queued(api_queued): '''Test queued position output from API.''' _, phase = API.read(api_queued) assert phase == 'QUEUED | POSITION: 6'