@staticmethod<EOL><INDENT>def verify_response(response, status_code, content_type=None):<DEDENT>
status = int(response.status.split('<STR_LIT:U+0020>', <NUM_LIT:1>)[<NUM_LIT:0>])<EOL>if status != status_code:<EOL><INDENT>return False<EOL><DEDENT>if content_type is None:<EOL><INDENT>return True<EOL><DEDENT>for header, value in response.headers:<EOL><INDENT>if header.lower() == '<STR_LIT>':<EOL><INDENT>return value == content_type<EOL><DEDENT><DEDENT>return False<EOL>
Verifies that a response has the expected status and content type.

        Args:
          response: The ResponseTuple to be checked.
          status_code: An int, the HTTP status code to be compared with response
            status.
          content_type: A string with the acceptable Content-Type header value.
            None allows any content type.

        Returns:
          True if both status_code and content_type match, else False.