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
aaa3d972
Commit
aaa3d972
authored
Mar 01, 2016
by
Muddasser
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11707 from edx/muddasser/bokchoy-test_accepting_redirects
Check both url and title for the presence of code
parents
acae281f
724058a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
common/test/acceptance/tests/lms/test_oauth2.py
+11
-2
No files found.
common/test/acceptance/tests/lms/test_oauth2.py
View file @
aaa3d972
...
...
@@ -57,8 +57,17 @@ class OAuth2PermissionDelegationTests(WebAppTest):
"""
self
.
_auth
()
assert
self
.
oauth_page
.
visit
()
self
.
oauth_page
.
confirm
()
# This redirects to an invalid URI.
query
=
self
.
_qs
(
self
.
browser
.
current_url
)
self
.
oauth_page
.
confirm
()
self
.
oauth_page
.
wait_for_element_absence
(
'input[name=authorize]'
,
'Authorization button is not present'
)
# Due to a bug in ChromeDriver, when chrome is on invalid URI,self.browser.current_url outputs
# data:text/html,chromewebdata. When this happens in our case,query string is present in the title.
# So to get query string, we branch out based on selected browser.
if
self
.
browser
.
name
==
'chrome'
:
query
=
self
.
_qs
(
self
.
browser
.
title
)
else
:
query
=
self
.
_qs
(
self
.
browser
.
current_url
)
self
.
assertIn
(
'code'
,
query
)
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