def test_parse_response_with_bad_status(): headers = { 'livescope-status': '406 Parameter Missing', 'content-type': 'text/plain', } response = MockResponse(headers) with pytest.raises(exceptions.ParameterMissing): parse_response(response)
def test_parse_response_with_image(): headers = { 'livescope-status': '0', 'content-type': 'image/jpeg', } response = MockResponse(headers, b'image data goes here') assert parse_response(response) == b'image data goes here'
def test_parse_response_with_parameters(): headers = {'livescope-status': '0', 'content-type': 'text/plain'} response = MockResponse(headers) assert parse_response(response) == {}