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
4f23c31d
Commit
4f23c31d
authored
Jan 26, 2015
by
Renzo Lucioni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix intermittent failures in bok-choy tests of payment and verification
parent
6604eedb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
9 deletions
+10
-9
common/djangoapps/course_modes/views.py
+3
-3
common/test/acceptance/pages/lms/create_mode.py
+4
-4
common/test/acceptance/pages/lms/track_selection.py
+1
-1
common/test/acceptance/tests/lms/test_lms.py
+1
-1
lms/envs/bok_choy.env.json
+1
-0
No files found.
common/djangoapps/course_modes/views.py
View file @
4f23c31d
...
@@ -245,7 +245,7 @@ def create_mode(request, course_id):
...
@@ -245,7 +245,7 @@ def create_mode(request, course_id):
Args:
Args:
request (`Request`): The Django Request object.
request (`Request`): The Django Request object.
course_id (unicode):
The slash-separated course key
.
course_id (unicode):
A course ID
.
Returns:
Returns:
Response
Response
...
@@ -267,7 +267,7 @@ def create_mode(request, course_id):
...
@@ -267,7 +267,7 @@ def create_mode(request, course_id):
CourseMode
.
objects
.
get_or_create
(
course_id
=
course_key
,
**
PARAMETERS
)
CourseMode
.
objects
.
get_or_create
(
course_id
=
course_key
,
**
PARAMETERS
)
# Return a success message and a 200 response
# Return a success message and a 200 response
return
HttpResponse
(
"Mode '{mode_slug}' created for
course with ID '{course_id
}'."
.
format
(
return
HttpResponse
(
"Mode '{mode_slug}' created for
'{course
}'."
.
format
(
mode_slug
=
PARAMETERS
[
'mode_slug'
],
mode_slug
=
PARAMETERS
[
'mode_slug'
],
course
_id
=
course_id
course
=
course_id
))
))
common/test/acceptance/pages/lms/create_mode.py
View file @
4f23c31d
...
@@ -33,7 +33,7 @@ class ModeCreationPage(PageObject):
...
@@ -33,7 +33,7 @@ class ModeCreationPage(PageObject):
"""
"""
super
(
ModeCreationPage
,
self
)
.
__init__
(
browser
)
super
(
ModeCreationPage
,
self
)
.
__init__
(
browser
)
self
.
course_id
=
course_id
self
.
_
course_id
=
course_id
self
.
_parameters
=
{}
self
.
_parameters
=
{}
if
mode_slug
is
not
None
:
if
mode_slug
is
not
None
:
...
@@ -54,9 +54,9 @@ class ModeCreationPage(PageObject):
...
@@ -54,9 +54,9 @@ class ModeCreationPage(PageObject):
@property
@property
def
url
(
self
):
def
url
(
self
):
"""Construct the mode creation URL."""
"""Construct the mode creation URL."""
url
=
'{base}/course_modes/create_mode/{course_id}'
.
format
(
url
=
'{base}/course_modes/create_mode/{course_id}
/
'
.
format
(
base
=
BASE_URL
,
base
=
BASE_URL
,
course_id
=
self
.
course_id
course_id
=
self
.
_
course_id
)
)
query_string
=
urllib
.
urlencode
(
self
.
_parameters
)
query_string
=
urllib
.
urlencode
(
self
.
_parameters
)
...
@@ -67,5 +67,5 @@ class ModeCreationPage(PageObject):
...
@@ -67,5 +67,5 @@ class ModeCreationPage(PageObject):
def
is_browser_on_page
(
self
):
def
is_browser_on_page
(
self
):
message
=
self
.
q
(
css
=
'BODY'
)
.
text
[
0
]
message
=
self
.
q
(
css
=
'BODY'
)
.
text
[
0
]
match
=
re
.
search
(
r'Mode ([^$]+) created for
course with ID
([^$]+).$'
,
message
)
match
=
re
.
search
(
r'Mode ([^$]+) created for ([^$]+).$'
,
message
)
return
True
if
match
else
False
return
True
if
match
else
False
common/test/acceptance/pages/lms/track_selection.py
View file @
4f23c31d
...
@@ -37,7 +37,7 @@ class TrackSelectionPage(PageObject):
...
@@ -37,7 +37,7 @@ class TrackSelectionPage(PageObject):
@property
@property
def
url
(
self
):
def
url
(
self
):
"""Return the URL corresponding to the track selection page."""
"""Return the URL corresponding to the track selection page."""
url
=
"{base}/course_modes/choose/{course_id}{querystring}"
.
format
(
url
=
"{base}/course_modes/choose/{course_id}
/
{querystring}"
.
format
(
base
=
BASE_URL
,
base
=
BASE_URL
,
course_id
=
self
.
_course_id
,
course_id
=
self
.
_course_id
,
querystring
=
self
.
_querystring
querystring
=
self
.
_querystring
...
...
common/test/acceptance/tests/lms/test_lms.py
View file @
4f23c31d
...
@@ -242,7 +242,6 @@ class RegisterFromCombinedPageTest(UniqueCourseTest):
...
@@ -242,7 +242,6 @@ class RegisterFromCombinedPageTest(UniqueCourseTest):
self
.
assertEqual
(
self
.
register_page
.
current_form
,
"login"
)
self
.
assertEqual
(
self
.
register_page
.
current_form
,
"login"
)
@skip
(
'ECOM-956: Failing intermittently due to 500 errors when trying to hit the mode creation endpoint.'
)
@attr
(
'shard_1'
)
@attr
(
'shard_1'
)
class
PayAndVerifyTest
(
UniqueCourseTest
):
class
PayAndVerifyTest
(
UniqueCourseTest
):
"""Test that we can proceed through the payment and verification flow."""
"""Test that we can proceed through the payment and verification flow."""
...
@@ -253,6 +252,7 @@ class PayAndVerifyTest(UniqueCourseTest):
...
@@ -253,6 +252,7 @@ class PayAndVerifyTest(UniqueCourseTest):
create a user and log them in.
create a user and log them in.
"""
"""
super
(
PayAndVerifyTest
,
self
)
.
setUp
()
super
(
PayAndVerifyTest
,
self
)
.
setUp
()
self
.
track_selection_page
=
TrackSelectionPage
(
self
.
browser
,
self
.
course_id
,
separate_verified
=
True
)
self
.
track_selection_page
=
TrackSelectionPage
(
self
.
browser
,
self
.
course_id
,
separate_verified
=
True
)
self
.
payment_and_verification_flow
=
PaymentAndVerificationFlow
(
self
.
browser
,
self
.
course_id
)
self
.
payment_and_verification_flow
=
PaymentAndVerificationFlow
(
self
.
browser
,
self
.
course_id
)
self
.
immediate_verification_page
=
PaymentAndVerificationFlow
(
self
.
browser
,
self
.
course_id
,
entry_point
=
'verify-now'
)
self
.
immediate_verification_page
=
PaymentAndVerificationFlow
(
self
.
browser
,
self
.
course_id
,
entry_point
=
'verify-now'
)
...
...
lms/envs/bok_choy.env.json
View file @
4f23c31d
...
@@ -78,6 +78,7 @@
...
@@ -78,6 +78,7 @@
"SUBDOMAIN_BRANDING"
:
false
,
"SUBDOMAIN_BRANDING"
:
false
,
"SUBDOMAIN_COURSE_LISTINGS"
:
false
,
"SUBDOMAIN_COURSE_LISTINGS"
:
false
,
"ALLOW_AUTOMATED_SIGNUPS"
:
true
,
"ALLOW_AUTOMATED_SIGNUPS"
:
true
,
"AUTOMATIC_AUTH_FOR_TESTING"
:
true
,
"MODE_CREATION_FOR_TESTING"
:
true
,
"MODE_CREATION_FOR_TESTING"
:
true
,
"AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING"
:
true
"AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING"
:
true
},
},
...
...
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