Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add integration tests for storage #660

Open
nijel opened this issue Feb 13, 2025 · 0 comments
Open

Add integration tests for storage #660

nijel opened this issue Feb 13, 2025 · 0 comments

Comments

@nijel
Copy link
Member

nijel commented Feb 13, 2025

python-social-auth/social-core#986 introduced breaking change in (OpenID) storage API and it went unnoticed into the release. I'm now reverting it in python-social-auth/social-core#1020.

If social-app-django would have integartion tests for these, the error would be noticed earlier.

Exception stack trace:

NotImplementedError: Implement in subclass
  File "django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "django/views/decorators/cache.py", line 80, in _view_wrapper
    response = view_func(request, *args, **kwargs)
  File "django/views/decorators/http.py", line 64, in inner
    return func(request, *args, **kwargs)
  File "weblate/accounts/views.py", line 1330, in social_auth
    return do_auth(request.backend, redirect_name=REDIRECT_FIELD_NAME)
  File "social_core/actions.py", line 35, in do_auth
    return backend.start()
  File "social_core/backends/base.py", line 33, in start
    if self.uses_redirect():
  File "social_core/backends/open_id.py", line 244, in uses_redirect
    return self.openid_request().shouldSendRedirect()
  File "social_core/backends/open_id.py", line 249, in openid_request
    return self.consumer().begin(url_add_parameters(self.openid_url(), params))
  File "openid/consumer/consumer.py", line 360, in begin
    return self.beginWithoutDiscovery(service, anonymous)
  File "openid/consumer/consumer.py", line 383, in beginWithoutDiscovery
    auth_req = self.consumer.begin(service)
  File "openid/consumer/consumer.py", line 611, in begin
    assoc = self._getAssociation(service_endpoint)
  File "openid/consumer/consumer.py", line 1179, in _getAssociation
    assoc = self.store.getAssociation(endpoint.server_url)
  File "social_core/store.py", line 39, in getAssociation
    for assoc_id, association in self.assoc.oids(server_url, handle):
  File "social_core/storage.py", line 229, in oids
    for assoc in cls.get_association(**kwargs)
  File "social_core/storage.py", line 256, in get_association
    raise NotImplementedError("Implement in subclass")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant