Re: social_django.models.UserSocialAuth.DoesNotExist in unit test

2020-08-05 Thread Roy Smith
I got this figured out. It turns out I had a dependency on social_auth in an entirely different part of my code where I execute reqeust.user.social_auth.get(provider='mediawiki').extra_data['access_token'] regardless of what auth backend was actually used. > On Aug 4, 2020, at 10:08 PM, Roy

social_django.models.UserSocialAuth.DoesNotExist in unit test

2020-08-04 Thread Roy Smith
I have both model and social backends configured in settings.py: > AUTHENTICATION_BACKENDS = ( > 'django.contrib.auth.backends.ModelBackend', > 'social_core.backends.mediawiki.MediaWiki', > ) When I run this test: > from django.test import TestCase, Client > from django.contrib.auth.mod