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
0e09ee61
Commit
0e09ee61
authored
Aug 07, 2013
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update some unit tests on clone_course
parent
55bfe46e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
cms/djangoapps/contentstore/tests/test_contentstore.py
+10
-4
No files found.
cms/djangoapps/contentstore/tests/test_contentstore.py
View file @
0e09ee61
...
...
@@ -633,15 +633,21 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
# now loop through all the units in the course and verify that the clone can render them, which
# means the objects are at least present
items
=
module_store
.
get_items
(
Location
([
'i4x'
,
'edX'
,
'toy'
,
'poll_question'
,
None
]))
items
=
module_store
.
get_items
(
Location
([
'i4x'
,
'edX'
,
'toy'
,
None
,
None
]))
self
.
assertGreater
(
len
(
items
),
0
)
clone_items
=
module_store
.
get_items
(
Location
([
'i4x'
,
'MITx'
,
'999'
,
'poll_question'
,
None
]))
clone_items
=
module_store
.
get_items
(
Location
([
'i4x'
,
'MITx'
,
'999'
,
None
,
None
]))
self
.
assertGreater
(
len
(
clone_items
),
0
)
self
.
assertEqual
(
len
(
items
),
len
(
clone_items
))
for
descriptor
in
items
:
new_loc
=
descriptor
.
location
.
replace
(
org
=
'MITx'
,
course
=
'999'
)
print
"Checking {0} should now also be at {1}"
.
format
(
descriptor
.
location
.
url
(),
new_loc
.
url
())
resp
=
self
.
client
.
get
(
reverse
(
'edit_unit'
,
kwargs
=
{
'location'
:
new_loc
.
url
()}))
self
.
assertEqual
(
resp
.
status_code
,
200
)
lookup_item
=
module_store
.
get_item
(
new_loc
)
# we want to assert equality between the objects, but we know the locations
# differ, so just make them equal for testing purposes
descriptor
.
location
=
new_loc
self
.
assertEqual
(
descriptor
,
lookup_item
)
def
test_illegal_draft_crud_ops
(
self
):
draft_store
=
modulestore
(
'draft'
)
...
...
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