[Python-modules-team] Bug#962937: python-oauthlib: FTBFS with newer python-mock

Ondřej Nový novy at ondrej.org
Tue Jun 16 08:49:50 BST 2020


Source: python-oauthlib
Version: 3.1.0-1
Severity: serious
Tags: ftbfs

python-oauthlib 3.1.0-1 FTBFS and autopkgtest fails with newer python-mock 4.0.2-1.

Thanks for fixing.

__________ AuthorizationCodeGrantTest.test_invalid_request_duplicates __________

self = <tests.oauth2.rfc6749.grant_types.test_authorization_code.AuthorizationCodeGrantTest testMethod=test_invalid_request_duplicates>

    def test_invalid_request_duplicates(self):
        request = mock.MagicMock(wraps=self.request)
        request.grant_type = 'authorization_code'
        request.duplicate_params = ['client_id']
>       self.assertRaises(errors.InvalidRequestError, self.auth.validate_token_request,
                          request)

tests/oauth2/rfc6749/grant_types/test_authorization_code.py:159: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py:453: in validate_token_request
    raise errors.InvalidRequestError(description='Duplicate %s parameter.' % param,
/usr/lib/python3/dist-packages/oauthlib/oauth2/rfc6749/errors.py:49: in __init__
    if request:
/usr/lib/python3/dist-packages/mock/mock.py:2160: in __get__
    return self.create_mock()
/usr/lib/python3/dist-packages/mock/mock.py:2156: in create_mock
    _set_return_value(parent, m, entry)
/usr/lib/python3/dist-packages/mock/mock.py:2053: in _set_return_value
    method._mock_wraps = getattr(mock._mock_wraps, name)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def __getattr__(self, name):
        if name in self._params:
            return self._params[name]
        else:
>           raise AttributeError(name)
E           AttributeError: __bool__

/usr/lib/python3/dist-packages/oauthlib/common.py:436: AttributeError

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.6.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=cs_CZ.UTF-8, LC_CTYPE=cs_CZ.UTF-8 (charmap=UTF-8), LANGUAGE=cs_CZ.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled



More information about the Python-modules-team mailing list