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
e6c235a4
Commit
e6c235a4
authored
Jun 03, 2016
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only assert on item-equality when checking ccx course modules
parent
95054e1a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
lms/djangoapps/ccx/api/v0/tests/test_views.py
+5
-5
No files found.
lms/djangoapps/ccx/api/v0/tests/test_views.py
View file @
e6c235a4
...
...
@@ -872,7 +872,7 @@ class CcxDetailTest(CcxRestApiTest):
)
self
.
assertEqual
(
resp
.
data
.
get
(
'coach_email'
),
self
.
ccx
.
coach
.
email
)
# pylint: disable=no-member
self
.
assertEqual
(
resp
.
data
.
get
(
'master_course_id'
),
unicode
(
self
.
ccx
.
course_id
))
# pylint: disable=no-member
self
.
assertEqual
(
resp
.
data
.
get
(
'course_modules'
),
self
.
master_course_chapters
)
# pylint: disable=no-member
self
.
assert
Items
Equal
(
resp
.
data
.
get
(
'course_modules'
),
self
.
master_course_chapters
)
# pylint: disable=no-member
def
test_delete_detail
(
self
):
"""
...
...
@@ -1039,19 +1039,19 @@ class CcxDetailTest(CcxRestApiTest):
resp
=
self
.
client
.
patch
(
self
.
detail_url
,
data
,
format
=
'json'
,
HTTP_AUTHORIZATION
=
self
.
auth
)
self
.
assertEqual
(
resp
.
status_code
,
status
.
HTTP_204_NO_CONTENT
)
ccx_from_db
=
CustomCourseForEdX
.
objects
.
get
(
id
=
self
.
ccx
.
id
)
self
.
assertEqual
(
ccx_from_db
.
structure
,
data
[
'course_modules'
])
self
.
assert
Items
Equal
(
ccx_from_db
.
structure
,
data
[
'course_modules'
])
data
=
{
'course_modules'
:
[]}
resp
=
self
.
client
.
patch
(
self
.
detail_url
,
data
,
format
=
'json'
,
HTTP_AUTHORIZATION
=
self
.
auth
)
self
.
assertEqual
(
resp
.
status_code
,
status
.
HTTP_204_NO_CONTENT
)
ccx_from_db
=
CustomCourseForEdX
.
objects
.
get
(
id
=
self
.
ccx
.
id
)
self
.
assertEqual
(
ccx_from_db
.
structure
,
[])
self
.
assert
Items
Equal
(
ccx_from_db
.
structure
,
[])
data
=
{
'course_modules'
:
self
.
master_course_chapters
}
resp
=
self
.
client
.
patch
(
self
.
detail_url
,
data
,
format
=
'json'
,
HTTP_AUTHORIZATION
=
self
.
auth
)
self
.
assertEqual
(
resp
.
status_code
,
status
.
HTTP_204_NO_CONTENT
)
ccx_from_db
=
CustomCourseForEdX
.
objects
.
get
(
id
=
self
.
ccx
.
id
)
self
.
assertEqual
(
ccx_from_db
.
structure
,
self
.
master_course_chapters
)
self
.
assert
Items
Equal
(
ccx_from_db
.
structure
,
self
.
master_course_chapters
)
data
=
{
'course_modules'
:
None
}
resp
=
self
.
client
.
patch
(
self
.
detail_url
,
data
,
format
=
'json'
,
HTTP_AUTHORIZATION
=
self
.
auth
)
...
...
@@ -1064,4 +1064,4 @@ class CcxDetailTest(CcxRestApiTest):
resp
=
self
.
client
.
patch
(
self
.
detail_url
,
data
,
format
=
'json'
,
HTTP_AUTHORIZATION
=
self
.
auth
)
self
.
assertEqual
(
resp
.
status_code
,
status
.
HTTP_204_NO_CONTENT
)
ccx_from_db
=
CustomCourseForEdX
.
objects
.
get
(
id
=
self
.
ccx
.
id
)
self
.
assertEqual
(
ccx_from_db
.
structure
,
chapters
)
self
.
assert
Items
Equal
(
ccx_from_db
.
structure
,
chapters
)
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