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
f7a83cdc
Commit
f7a83cdc
authored
Apr 03, 2013
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip: add test case for exporting/importing a private module
parent
1a1635d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
cms/djangoapps/contentstore/tests/test_contentstore.py
+16
-0
No files found.
cms/djangoapps/contentstore/tests/test_contentstore.py
View file @
f7a83cdc
...
...
@@ -302,6 +302,16 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
root_dir
=
path
(
mkdtemp_clean
())
# now create a private vertical
private_vertical
=
draft_store
.
clone_item
(
vertical
.
location
,
Location
([
'i4x'
,
'edX'
,
'full'
,
'vertical'
,
'a_private_vertical'
,
None
]))
# add private to list of children
sequential
=
module_store
.
get_item
(
Location
([
'i4x'
,
'edX'
,
'full'
,
'sequential'
,
'Administrivia_and_Circuit_Elements'
,
None
]))
module_store
.
update_children
(
sequential
.
location
,
sequential
.
children
+
[
private_vertical
.
location
.
url
()])
print
'Exporting to tempdir = {0}'
.
format
(
root_dir
)
# export out to a tempdir
...
...
@@ -357,6 +367,12 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
for
child
in
vertical
.
get_children
():
self
.
assertTrue
(
hasattr
(
child
,
'is_draft'
))
# verify that we have the private vertical
test_private_vertical
=
draft_store
.
get_item
(
Location
([
'i4x'
,
'edX'
,
'full'
,
'vertical'
,
'vertical_66'
,
None
]))
self
.
assertTrue
(
hasattr
(
test_private_vertical
,
'is_draft'
))
shutil
.
rmtree
(
root_dir
)
def
test_course_handouts_rewrites
(
self
):
...
...
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