[Python-modules-team] Bug#865603: django-oauth-toolkit FTBFS with Django 1.11

Adrian Bunk bunk at debian.org
Fri Jun 23 04:18:47 UTC 2017


Source: django-oauth-toolkit
Version: 0.11.0-1
Severity: serious
Tags: buster sid

https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/django-oauth-toolkit.html

...
   debian/rules override_dh_auto_test
make[1]: Entering directory '/build/1st/django-oauth-toolkit-0.11.0'
PYBUILD_SYSTEM=custom PYBUILD_TEST_ARGS="{interpreter} runtests.py" dh_auto_test
I: pybuild base:184: python2.7 runtests.py
============================= test session starts ==============================
platform linux2 -- Python 2.7.13, pytest-3.0.6, py-1.4.34, pluggy-0.4.0
django settings: oauth2_provider.tests.settings (from ini file)
rootdir: /build/1st/django-oauth-toolkit-0.11.0, inifile: tox.ini
plugins: django-2.9.1
collected 173 items

oauth2_provider/tests/test_application_views.py .....
oauth2_provider/tests/test_auth_backends.py ........
oauth2_provider/tests/test_authorization_code.py ..........................................
oauth2_provider/tests/test_client_credential.py .....
oauth2_provider/tests/test_decorators.py ...
oauth2_provider/tests/test_generator.py ...
oauth2_provider/tests/test_implicit.py ...........
oauth2_provider/tests/test_mixins.py ........
oauth2_provider/tests/test_models.py ............
oauth2_provider/tests/test_oauth2_backends.py ......
oauth2_provider/tests/test_oauth2_validators.py ...................
oauth2_provider/tests/test_password.py ...
oauth2_provider/tests/test_rest_framework.py ..............
oauth2_provider/tests/test_scopes.py .F............
oauth2_provider/tests/test_token_revocation.py ......
oauth2_provider/tests/test_token_view.py ..........
oauth2_provider/tests/test_validators.py ....

=================================== FAILURES ===================================
 TestScopesQueryParameterBackwardsCompatibility.test_scopes_query_parameter_is_supported_on_post 

self = <oauth2_provider.tests.test_scopes.TestScopesQueryParameterBackwardsCompatibility testMethod=test_scopes_query_parameter_is_supported_on_post>

    def test_scopes_query_parameter_is_supported_on_post(self):
        """
            Tests support for plural `scopes` query parameter on POST requests.
    
            """
        self.client.login(username="test_user", password="123456")
    
        # retrieve a valid authorization code
        authcode_data = {
            'client_id': self.application.client_id,
            'state': 'random_state_string',
            'scopes': 'read write',  # using plural `scopes`
            'redirect_uri': 'http://example.it',
            'response_type': 'code',
            'allow': True,
        }
>       response = self.client.post(reverse('oauth2_provider:authorize'), data=authcode_data)

oauth2_provider/tests/test_scopes.py:91: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python2.7/dist-packages/django/test/client.py:548: in post
    secure=secure, **extra)
/usr/lib/python2.7/dist-packages/django/test/client.py:350: in post
    secure=secure, **extra)
/usr/lib/python2.7/dist-packages/django/test/client.py:416: in generic
    return self.request(**r)
/usr/lib/python2.7/dist-packages/django/test/client.py:501: in request
    six.reraise(*exc_info)
/usr/lib/python2.7/dist-packages/django/core/handlers/exception.py:41: in inner
    response = get_response(request)
/usr/lib/python2.7/dist-packages/django/core/handlers/base.py:249: in _legacy_get_response
    response = self._get_response(request)
/usr/lib/python2.7/dist-packages/django/core/handlers/base.py:187: in _get_response
    response = self.process_exception_by_middleware(e, request)
/usr/lib/python2.7/dist-packages/django/core/handlers/base.py:185: in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
/usr/lib/python2.7/dist-packages/django/views/generic/base.py:68: in view
    return self.dispatch(request, *args, **kwargs)
oauth2_provider/views/base.py:33: in dispatch
    return super(BaseAuthorizationView, self).dispatch(request, *args, **kwargs)
/usr/lib/python2.7/dist-packages/braces/views/_access.py:102: in dispatch
    request, *args, **kwargs)
/usr/lib/python2.7/dist-packages/django/views/generic/base.py:88: in dispatch
    return handler(request, *args, **kwargs)
/usr/lib/python2.7/dist-packages/django/views/generic/edit.py:181: in post
    form = self.get_form()
/usr/lib/python2.7/dist-packages/django/views/generic/edit.py:45: in get_form
    return form_class(**self.get_form_kwargs())
oauth2_provider/forms.py:16: in __init__
    data['scope'] = data['scopes']
/usr/lib/python2.7/dist-packages/django/http/request.py:434: in __setitem__
    self._assert_mutable()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <QueryDict: {u'scopes': [u'read write'], u'client_id': [u'TQsIDPspMKuaQefKLhBH...ri': [u'http://example.it'], u'response_type': [u'code'], u'allow': [u'True']}>

    def _assert_mutable(self):
        if not self._mutable:
>           raise AttributeError("This QueryDict instance is immutable")
E           AttributeError: This QueryDict instance is immutable

/usr/lib/python2.7/dist-packages/django/http/request.py:431: AttributeError
==================== 1 failed, 172 passed in 23.40 seconds =====================
E: pybuild pybuild:283: test: plugin custom failed with: exit code=1: python2.7 runtests.py
dh_auto_test: pybuild --test --test-pytest -i python{version} -p 2.7 returned exit code 13
debian/rules:23: recipe for target 'override_dh_auto_test' failed
make[1]: *** [override_dh_auto_test] Error 25



More information about the Python-modules-team mailing list