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
51f8c0cf
Commit
51f8c0cf
authored
Jun 19, 2013
by
JonahStanley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added the beginnings of self cleanup
parent
f90ed69c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
cms/djangoapps/contentstore/tests/test_contentstore.py
+12
-4
No files found.
cms/djangoapps/contentstore/tests/test_contentstore.py
View file @
51f8c0cf
...
...
@@ -43,11 +43,12 @@ from django_comment_common.utils import are_permissions_roles_seeded
from
xmodule.exceptions
import
InvalidVersionError
import
datetime
from
pytz
import
UTC
#from uuid import uuid4
from
uuid
import
uuid4
import
pymongo
TEST_DATA_CONTENTSTORE
=
copy
.
deepcopy
(
settings
.
CONTENTSTORE
)
TEST_DATA_CONTENTSTORE
[
'OPTIONS'
][
'db'
]
=
'test_xcontent_
%
s'
%
4
#
uuid4().hex
TEST_DATA_CONTENTSTORE
[
'OPTIONS'
][
'db'
]
=
'test_xcontent_
%
s'
%
uuid4
()
.
hex
class
MongoCollectionFindWrapper
(
object
):
...
...
@@ -88,7 +89,10 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
self
.
client
=
Client
()
self
.
client
.
login
(
username
=
uname
,
password
=
password
)
def
tearDown
(
self
):
m
=
pymongo
.
MongoClient
()
m
.
drop_database
(
TEST_DATA_CONTENTSTORE
[
'OPTIONS'
][
'db'
])
#contentstore().fs_files.drop()
def
check_components_on_page
(
self
,
component_types
,
expected_types
):
"""
...
...
@@ -449,7 +453,6 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
content_store
=
contentstore
()
trash_store
=
contentstore
(
'trashcan'
)
module_store
=
modulestore
(
'direct'
)
import_from_xml
(
module_store
,
'common/test/data/'
,
[
'full'
],
static_content_store
=
content_store
)
# look up original (and thumbnail) in content store, should be there after import
...
...
@@ -853,6 +856,11 @@ class ContentStoreTest(ModuleStoreTestCase):
'display_name'
:
'Robot Super Course'
,
}
def
tearDown
(
self
):
m
=
pymongo
.
MongoClient
()
m
.
drop_database
(
TEST_DATA_CONTENTSTORE
[
'OPTIONS'
][
'db'
])
#contentstore().fs_files.drop()
def
test_create_course
(
self
):
"""Test new course creation - happy path"""
resp
=
self
.
client
.
post
(
reverse
(
'create_new_course'
),
self
.
course_data
)
...
...
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