@pytest.mark.parametrize('content,content_type,exp_summary_content,exp_url_in_summary', [['{"bad": "response"}', 'application/json', '{"bad": "response"}', False], ['plain text', 'text/plain', 'plain text', False], ['<div>HTML content</div>', 'text/html; charset=utf-8', '(HTML body ignored)', True]])
def test_get_error_response_summary(content, content_type, exp_summary_content, exp_url_in_summary):
    '\n    get_error_response_summary should provide a summary of an error HTTP response object with the correct bits of\n    information depending on the type of content.\n    '
    status_code = 400
    url = 'http://example.com'
    mock_response = MockResponse(status_code=status_code, content=content, content_type=content_type, url=url)
    summary = get_error_response_summary(mock_response)
    assert (f'Response - code: {status_code}' in summary)
    assert (f'content: {exp_summary_content}' in summary)
    assert ((f'url: {url}' in summary) is exp_url_in_summary)
get_error_response_summary should provide a summary of an error HTTP response object with the correct bits of
information depending on the type of content.
@pytest.mark.parametrize('content,content_type,exp_summary_content,exp_url_in_summary', [['{"bad": "response"}', 'application/json', '{"bad": "response"}', False], ['plain text', 'text/plain', 'plain text', False], ['<div>HTML content</div>', 'text/html; charset=utf-8', '(HTML body ignored)', True]])
def test_get_error_response_summary(content, content_type, exp_summary_content, exp_url_in_summary):
    '\n    get_error_response_summary should provide a summary of an error HTTP response object with the correct bits of\n    information depending on the type of content.\n    '
    status_code = 400
    url = 'http://example.com'
    mock_response = MockResponse(status_code=status_code, content=content, content_type=content_type, url=url)
    summary = get_error_response_summary(mock_response)
    assert (f'Response - code: {status_code}' in summary)
    assert (f'content: {exp_summary_content}' in summary)
    assert ((f'url: {url}' in summary) is exp_url_in_summary)