@modify_settings(INSTALLED_APPS={'remove': ['rest_framework.authtoken', ]})
    def test_login_social_oauth1_jwt(self):
        """
        Currently oauth1 works only if session is enabled.
        Probably it is possible to make it work without session, but
        it will be needed to change the logic in python-social-auth.
        """
        try:
            import rest_framework_jwt
        except __HOLE__:
            return
        assert rest_framework_jwt is not None
        resp = self.client.post(reverse('login_social_jwt_user'),
            data={'provider': 'twitter'})
        self.assertEqual(resp.status_code, 200)
        self.assertEqual(resp.data, parse_qs(self.request_token_body))
        resp = self.client.post(reverse('login_social_token_user'), data={
            'provider': 'twitter',
            'oauth_token': 'foobar',
            'oauth_verifier': 'overifier'
        })
        self.assertEqual(resp.status_code, 200)
dataset/ETHPy150Open st4lk/django-rest-social-auth/tests/test_social.py/TestSocialAuth1.test_login_social_oauth1_jwt