From c18771aa8542d631a297a7aa6913a6f68c0690e3 Mon Sep 17 00:00:00 2001 From: Philippe Luickx Date: Thu, 23 Mar 2017 13:54:22 +0200 Subject: [PATCH] adapted test case and added DRF as pip requirement for tests --- rest_auth/tests/requirements.pip | 1 + rest_auth/tests/test_social.py | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/rest_auth/tests/requirements.pip b/rest_auth/tests/requirements.pip index 5a30385..b86361a 100644 --- a/rest_auth/tests/requirements.pip +++ b/rest_auth/tests/requirements.pip @@ -2,3 +2,4 @@ django-allauth>=0.25.0 responses>=0.3.0 flake8==2.4.0 djangorestframework-jwt>=1.7.2 +djangorestframework>=3.6.2 \ No newline at end of file diff --git a/rest_auth/tests/test_social.py b/rest_auth/tests/test_social.py index 47ac0bb..ab68e13 100644 --- a/rest_auth/tests/test_social.py +++ b/rest_auth/tests/test_social.py @@ -275,8 +275,12 @@ class TestSocialAuth(TestCase, BaseAPITestCase): 'access_token': 'abc123' } - self.post(self.fb_login_url, data=payload, status_code=200) - self.assertIn('key', self.response.json.keys()) + # You should not have access to an account created through register + # by loging in through FB with an account that has the same + # email address. + self.post(self.fb_login_url, data=payload, status_code=400) + # self.post(self.fb_login_url, data=payload, status_code=200) + # self.assertIn('key', self.response.json.keys()) @responses.activate @override_settings(