<s> import pytest <EOL> from requests . models import Response <EOL> from bravado . exception import HTTPError <EOL> from bravado . requests_client import RequestsResponseAdapter <EOL> @ pytest . fixture <EOL> def response_500 ( ) : <EOL> requests_response = Response ( ) <EOL> requests_response . status_code = <NUM_LIT> <EOL> requests_response . reason = "<STR_LIT>" <EOL> return requests_response <EOL> def test_response_only ( response_500 ) : <EOL> incoming_response = RequestsResponseAdapter ( response_500 ) <EOL> assert str ( HTTPError ( incoming_response ) ) == '<STR_LIT>' <EOL> def test_response_and_message ( response_500 ) : <EOL> incoming_response = RequestsResponseAdapter ( response_500 ) <EOL> actual = str ( HTTPError ( incoming_response , message = "<STR_LIT>" ) ) <EOL> assert actual == '<STR_LIT>' <EOL> def test_response_and_swagger_result ( response_500 ) : <EOL> incoming_response = RequestsResponseAdapter ( response_500 ) <EOL> actual = str ( HTTPError ( incoming_response , swagger_result = { '<STR_LIT>' : '<STR_LIT>' } ) ) <EOL> assert actual == "<STR_LIT>" <EOL> def test_response_and_message_and_swagger_result ( response_500 ) : <EOL> incoming_response = RequestsResponseAdapter ( response_500 ) <EOL> actual = str ( HTTPError ( <EOL> incoming_response , <EOL> message = "<STR_LIT>" , <EOL> swagger_result = { '<STR_LIT>' : '<STR_LIT>' } ) ) <EOL> assert actual == "<STR_LIT>" </s>
