Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
2da3db60
Commit
2da3db60
authored
7 years ago
by
Saleem Latif
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test failures
parent
3b9550bd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
6 deletions
+8
-6
common/djangoapps/third_party_auth/tests/specs/base.py
+2
-1
common/djangoapps/third_party_auth/tests/specs/test_azuread.py
+2
-2
common/djangoapps/third_party_auth/tests/specs/test_google.py
+3
-3
lms/djangoapps/student_account/views.py
+1
-0
No files found.
common/djangoapps/third_party_auth/tests/specs/base.py
View file @
2da3db60
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
common/djangoapps/third_party_auth/tests/specs/test_azuread.py
View file @
2da3db60
...
...
@@ -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'
,
...
...
This diff is collapsed.
Click to expand it.
common/djangoapps/third_party_auth/tests/specs/test_google.py
View file @
2da3db60
...
...
@@ -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'
,
...
...
This diff is collapsed.
Click to expand it.
lms/djangoapps/student_account/views.py
View file @
2da3db60
...
...
@@ -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
():
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment