Beispiel #1
0
def _get_auth_scheme_exception(header, err_msg):
    with patch('requests.Response') as mock:
        mock.headers = header
        with pytest.raises(DCOSException) as e:
            auth._get_auth_scheme(mock)

    assert str(e.value) == err_msg
Beispiel #2
0
def _get_auth_scheme_exception(header, err_msg):
    with patch('requests.Response') as mock:
        mock.headers = header
        with pytest.raises(DCOSException) as e:
            auth._get_auth_scheme(mock)

    assert str(e.value) == err_msg
Beispiel #3
0
def _get_auth_scheme(header, scheme):
    with patch('requests.Response') as mock:
        mock.headers = header
        auth_scheme = auth._get_auth_scheme(mock)
        assert auth_scheme == scheme
Beispiel #4
0
def _get_auth_scheme(header, scheme):
    with patch('requests.Response') as mock:
        mock.headers = header
        auth_scheme = auth._get_auth_scheme(mock)
        assert auth_scheme == scheme