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
509a8614
Commit
509a8614
authored
Aug 22, 2013
by
Julian Arni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clear contentstore
Signed-off-by: Julian Arni <julian@edx.org>
parent
a28b02ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
cms/djangoapps/contentstore/tests/test_import_export.py
+12
-2
No files found.
cms/djangoapps/contentstore/tests/test_import_export.py
View file @
509a8614
...
@@ -5,13 +5,21 @@ import os
...
@@ -5,13 +5,21 @@ import os
import
shutil
import
shutil
import
tarfile
import
tarfile
import
tempfile
import
tempfile
import
copy
from
uuid
import
uuid4
from
pymongo
import
MongoClient
from
.utils
import
CourseTestCase
from
.utils
import
CourseTestCase
from
django.core.urlresolvers
import
reverse
from
django.core.urlresolvers
import
reverse
from
django.test.utils
import
override_settings
from
django.conf
import
settings
from
xmodule.modulestore
import
Location
from
xmodule.contentstore.django
import
_CONTENTSTORE
from
contentstore.views
import
import_export
TEST_DATA_CONTENTSTORE
=
copy
.
deepcopy
(
settings
.
CONTENTSTORE
)
TEST_DATA_CONTENTSTORE
[
'OPTIONS'
][
'db'
]
=
'test_xcontent_
%
s'
%
uuid4
()
.
hex
@override_settings
(
CONTENTSTORE
=
TEST_DATA_CONTENTSTORE
)
class
ImportTestCase
(
CourseTestCase
):
class
ImportTestCase
(
CourseTestCase
):
"""
"""
Unit tests for importing a course
Unit tests for importing a course
...
@@ -54,6 +62,8 @@ class ImportTestCase(CourseTestCase):
...
@@ -54,6 +62,8 @@ class ImportTestCase(CourseTestCase):
def
tearDown
(
self
):
def
tearDown
(
self
):
shutil
.
rmtree
(
self
.
content_dir
)
shutil
.
rmtree
(
self
.
content_dir
)
MongoClient
()
.
drop_database
(
TEST_DATA_CONTENTSTORE
[
'OPTIONS'
][
'db'
])
_CONTENTSTORE
.
clear
()
def
test_no_coursexml
(
self
):
def
test_no_coursexml
(
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