Commit 2da3db60 by Saleem Latif

Fix test failures

parent 3b9550bd
......@@ -894,8 +894,9 @@ class IntegrationTest(testutil.TestCase, test.TestCase):
strategy.storage.user.create_user(username=self.get_username(), email='user@email.com', password='password')
backend = strategy.request.backend
backend.auth_complete = mock.MagicMock(return_value=self.fake_auth_complete(strategy))
# If learner already has an account then make sure login page is served instead of registration.
# pylint: disable=protected-access
self.assert_redirect_to_register_looks_correct(actions.do_complete(backend, social_views._do_login))
self.assert_redirect_to_login_looks_correct(actions.do_complete(backend, social_views._do_login))
distinct_username = pipeline.get(request)['kwargs']['username']
self.assertNotEqual(original_username, distinct_username)
......
......@@ -35,8 +35,8 @@ class AzureADOauth2IntegrationTest(base.Oauth2IntegrationTest):
'aud': 'abcdefgh-1234-5678-900a-0aa0a00aa0aa',
'tid': 'abcdefgh-1234-5678-900a-0aa0a00aa0aa',
'amr': ['pwd'],
'unique_name': 'email_value@example.com',
'upn': 'email_value@example.com',
'unique_name': 'user@email.com',
'upn': 'user@email.com',
'family_name': 'family_name_value',
'name': 'name_value',
'given_name': 'given_name_value',
......
......@@ -31,7 +31,7 @@ class GoogleOauth2IntegrationTest(base.Oauth2IntegrationTest):
'token_type': 'token_type_value',
}
USER_RESPONSE_DATA = {
'email': 'email_value@example.com',
'email': 'user@email.com',
'family_name': 'family_name_value',
'given_name': 'given_name_value',
'id': 'id_value',
......@@ -85,8 +85,8 @@ class GoogleOauth2IntegrationTest(base.Oauth2IntegrationTest):
'backend_name': 'google-oauth2',
'provider_id': 'oa2-google-oauth2',
'user_details': {
'username': 'email_value',
'email': 'email_value@example.com',
'username': 'user',
'email': 'user@email.com',
'fullname': 'name_value',
'first_name': 'given_name_value',
'last_name': 'family_name_value',
......
......@@ -350,6 +350,7 @@ def _third_party_auth_context(request, redirect_to, tpa_hint=None):
"errorMessage": None,
"registerFormSubmitButtonText": _("Create Account"),
"syncLearnerProfileData": False,
"hideSignInLink": False,
}
if third_party_auth.is_enabled():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment