'Check expected success response code against the http response
:param int expected_code: The response code that is expected.
Optionally a list of integers can be used
to specify multiple valid success codes
:param int read_code: The response code which was returned in the
response
:raises AssertionError: if the expected_code isn\'t a valid http success
response code
:raises exceptions.InvalidHttpSuccessCode: if the read code isn\'t an
expected http success code'

@classmethod
def expected_success(cls, expected_code, read_code):

    if (not isinstance(read_code, int)):
        raise TypeError(("'read_code'    must    be    an    int    instead    of    (%s)" % type(read_code)))
    assert_msg = 'This    function    only    allowed    to    use    for    HTTP    status    codes    which    explicitly    defined    in    the    RFC    7231    &    4918.    {0}    is    not    a    defined    Success    Code!'.format(expected_code)
    if isinstance(expected_code, list):
        for code in expected_code:
            assert (code in (HTTP_SUCCESS + HTTP_REDIRECTION)), assert_msg
    else:
        assert (expected_code in (HTTP_SUCCESS + HTTP_REDIRECTION)), assert_msg
    if (read_code < 400):
        pattern = 'Unexpected    http    success    status    code    {0},    The    expected    status    code    is    {1}'
        if (((not isinstance(expected_code, list)) and (read_code != expected_code)) or (isinstance(expected_code, list) and (read_code not in expected_code))):
            details = pattern.format(read_code, expected_code)
            raise exceptions.InvalidHttpSuccessCode(details)
