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
8385db85
Commit
8385db85
authored
Mar 21, 2013
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up comments.
parent
016fe196
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
cms/djangoapps/contentstore/tests/test_checklists.py
+4
-7
No files found.
cms/djangoapps/contentstore/tests/test_checklists.py
View file @
8385db85
...
...
@@ -5,7 +5,6 @@ from xmodule.modulestore.tests.factories import CourseFactory
from
django.core.urlresolvers
import
reverse
import
json
class
ChecklistTestCase
(
CourseTestCase
):
def
setUp
(
self
):
super
(
ChecklistTestCase
,
self
)
.
setUp
()
...
...
@@ -38,8 +37,7 @@ class ChecklistTestCase(CourseTestCase):
'name'
:
self
.
course
.
location
.
name
})
returned_checklists
=
json
.
loads
(
self
.
client
.
get
(
update_url
)
.
content
)
self
.
assertListEqual
(
self
.
get_persisted_checklists
(),
returned_checklists
)
self
.
assertListEqual
(
self
.
get_persisted_checklists
(),
returned_checklists
)
def
test_update_checklists_index_ignored_on_get
(
self
):
# Checklist index ignored on get.
...
...
@@ -69,12 +67,11 @@ class ChecklistTestCase(CourseTestCase):
self
.
assertContains
(
response
,
'Could not save checklist'
,
status_code
=
400
)
def
test_update_checklists_index
(
self
):
# Check
list index out of range, will error on post
.
# Check
that an update of a particular checklist works
.
update_url
=
reverse
(
'checklists_updates'
,
kwargs
=
{
'org'
:
self
.
course
.
location
.
org
,
'course'
:
self
.
course
.
location
.
course
,
'name'
:
self
.
course
.
location
.
name
,
'checklist_index'
:
2
})
payload
=
self
.
course
.
checklists
[
2
]
self
.
assertFalse
(
payload
.
get
(
'is_checked'
))
payload
[
'is_checked'
]
=
True
...
...
@@ -83,8 +80,8 @@ class ChecklistTestCase(CourseTestCase):
self
.
assertTrue
(
returned_checklist
.
get
(
'is_checked'
))
self
.
assertEqual
(
self
.
get_persisted_checklists
()[
2
],
returned_checklist
)
def
test_update_checklists_delete
d
_unsupported
(
self
):
#
Checklist index out of range, will error on post
.
def
test_update_checklists_delete_unsupported
(
self
):
#
Delete operation is not supported
.
update_url
=
reverse
(
'checklists_updates'
,
kwargs
=
{
'org'
:
self
.
course
.
location
.
org
,
'course'
:
self
.
course
.
location
.
course
,
'name'
:
self
.
course
.
location
.
name
,
...
...
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