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
OpenEdx
edx-platform
Commits
19f0bf0f
Commit
19f0bf0f
authored
Jun 23, 2014
by
stv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing forked tests
These had been failing for a while.
parent
4b88f54a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
+9
-10
cms/djangoapps/contentstore/views/tests/test_checklists.py
+3
-4
common/lib/xmodule/xmodule/tests/test_capa_module.py
+6
-6
No files found.
cms/djangoapps/contentstore/views/tests/test_checklists.py
View file @
19f0bf0f
...
@@ -41,7 +41,7 @@ class ChecklistTestCase(CourseTestCase):
...
@@ -41,7 +41,7 @@ class ChecklistTestCase(CourseTestCase):
def
test_get_checklists
(
self
):
def
test_get_checklists
(
self
):
""" Tests the get checklists method and URL expansion. """
""" Tests the get checklists method and URL expansion. """
response
=
self
.
client
.
get
(
self
.
checklists_url
)
response
=
self
.
client
.
get
(
self
.
checklists_url
)
self
.
assertContains
(
response
,
"
Getting Started With Studio
"
)
self
.
assertContains
(
response
,
"
Putting the structure in place
"
)
# Verify expansion of action URL happened.
# Verify expansion of action URL happened.
self
.
assertContains
(
response
,
'course_team/slashes:mitX+333+Checklists_Course'
)
self
.
assertContains
(
response
,
'course_team/slashes:mitX+333+Checklists_Course'
)
# Verify persisted checklist does NOT have expanded URL.
# Verify persisted checklist does NOT have expanded URL.
...
@@ -63,7 +63,7 @@ class ChecklistTestCase(CourseTestCase):
...
@@ -63,7 +63,7 @@ class ChecklistTestCase(CourseTestCase):
def
test_get_checklists_html
(
self
):
def
test_get_checklists_html
(
self
):
""" Tests getting the HTML template for the checklists page). """
""" Tests getting the HTML template for the checklists page). """
response
=
self
.
client
.
get
(
self
.
checklists_url
,
HTTP_ACCEPT
=
'text/html'
)
response
=
self
.
client
.
get
(
self
.
checklists_url
,
HTTP_ACCEPT
=
'text/html'
)
self
.
assertContains
(
response
,
"
Getting Started With Studio
"
)
self
.
assertContains
(
response
,
"
Putting the structure in place
"
)
# The HTML generated will define the handler URL (for use by the Backbone model).
# The HTML generated will define the handler URL (for use by the Backbone model).
self
.
assertContains
(
response
,
self
.
checklists_url
)
self
.
assertContains
(
response
,
self
.
checklists_url
)
...
@@ -139,8 +139,7 @@ class ChecklistTestCase(CourseTestCase):
...
@@ -139,8 +139,7 @@ class ChecklistTestCase(CourseTestCase):
test_expansion
(
self
.
course
.
checklists
[
0
],
0
,
'ManageUsers'
,
'/course_team/slashes:mitX+333+Checklists_Course/'
)
test_expansion
(
self
.
course
.
checklists
[
0
],
0
,
'ManageUsers'
,
'/course_team/slashes:mitX+333+Checklists_Course/'
)
test_expansion
(
self
.
course
.
checklists
[
1
],
1
,
'CourseOutline'
,
'/course/slashes:mitX+333+Checklists_Course'
)
test_expansion
(
self
.
course
.
checklists
[
1
],
1
,
'CourseOutline'
,
'/course/slashes:mitX+333+Checklists_Course'
)
raise
Exception
(
'FUNK CHECKLIST {}'
.
format
(
self
.
course
.
checklists
[
2
]))
test_expansion
(
self
.
course
.
checklists
[
2
],
0
,
'http://www.youtube.com'
,
'http://www.youtube.com'
)
test_expansion
(
self
.
course
.
checklists
[
2
],
0
,
'http://help.edge.edx.org/'
,
'http://help.edge.edx.org/'
)
def
get_first_item
(
checklist
):
def
get_first_item
(
checklist
):
...
...
common/lib/xmodule/xmodule/tests/test_capa_module.py
View file @
19f0bf0f
...
@@ -920,23 +920,23 @@ class CapaModuleTest(unittest.TestCase):
...
@@ -920,23 +920,23 @@ class CapaModuleTest(unittest.TestCase):
# more attempts than allowed.
# more attempts than allowed.
attempts
=
random
.
randint
(
1
,
10
)
attempts
=
random
.
randint
(
1
,
10
)
module
=
CapaFactory
.
create
(
attempts
=
attempts
-
1
,
max_attempts
=
attempts
)
module
=
CapaFactory
.
create
(
attempts
=
attempts
-
1
,
max_attempts
=
attempts
)
self
.
assertEqual
(
module
.
check_button_name
(),
"Submit"
)
self
.
assertEqual
(
module
.
check_button_name
(),
"
Final
Submit"
)
module
=
CapaFactory
.
create
(
attempts
=
attempts
,
max_attempts
=
attempts
)
module
=
CapaFactory
.
create
(
attempts
=
attempts
,
max_attempts
=
attempts
)
self
.
assertEqual
(
module
.
check_button_name
(),
"Submit"
)
self
.
assertEqual
(
module
.
check_button_name
(),
"
Final
Submit"
)
module
=
CapaFactory
.
create
(
attempts
=
attempts
+
1
,
max_attempts
=
attempts
)
module
=
CapaFactory
.
create
(
attempts
=
attempts
+
1
,
max_attempts
=
attempts
)
self
.
assertEqual
(
module
.
check_button_name
(),
"Submit"
)
self
.
assertEqual
(
module
.
check_button_name
(),
"
Final
Submit"
)
module
=
CapaFactory
.
create
(
attempts
=
attempts
-
2
,
max_attempts
=
attempts
)
module
=
CapaFactory
.
create
(
attempts
=
attempts
-
2
,
max_attempts
=
attempts
)
self
.
assertEqual
(
module
.
check_button_name
(),
"
Final
Submit"
)
self
.
assertEqual
(
module
.
check_button_name
(),
"Submit"
)
module
=
CapaFactory
.
create
(
attempts
=
attempts
-
3
,
max_attempts
=
attempts
)
module
=
CapaFactory
.
create
(
attempts
=
attempts
-
3
,
max_attempts
=
attempts
)
self
.
assertEqual
(
module
.
check_button_name
(),
"
Final
Submit"
)
self
.
assertEqual
(
module
.
check_button_name
(),
"Submit"
)
# If no limit on attempts
# If no limit on attempts
module
=
CapaFactory
.
create
(
attempts
=
attempts
-
3
)
module
=
CapaFactory
.
create
(
attempts
=
attempts
-
3
)
self
.
assertEqual
(
module
.
check_button_name
(),
"
Final
Submit"
)
self
.
assertEqual
(
module
.
check_button_name
(),
"Submit"
)
module
=
CapaFactory
.
create
(
attempts
=
0
)
module
=
CapaFactory
.
create
(
attempts
=
0
)
self
.
assertEqual
(
module
.
check_button_name
(),
"Submit"
)
self
.
assertEqual
(
module
.
check_button_name
(),
"Submit"
)
...
...
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