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
0c1c3f11
Commit
0c1c3f11
authored
Aug 21, 2013
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
loop in static import testing into common/* tests
parent
fb3a5bf9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
cms/djangoapps/contentstore/tests/test_contentstore.py
+1
-1
common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py
+5
-1
No files found.
cms/djangoapps/contentstore/tests/test_contentstore.py
View file @
0c1c3f11
...
@@ -476,7 +476,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
...
@@ -476,7 +476,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
content_store
=
contentstore
()
content_store
=
contentstore
()
module_store
=
modulestore
(
'direct'
)
module_store
=
modulestore
(
'direct'
)
import_from_xml
(
module_store
,
'common/test/data/'
,
[
'toy'
],
static_content_store
=
content_store
)
import_from_xml
(
module_store
,
'common/test/data/'
,
[
'toy'
],
static_content_store
=
content_store
,
verbose
=
True
)
course_location
=
CourseDescriptor
.
id_to_location
(
'edX/toy/2012_Fall'
)
course_location
=
CourseDescriptor
.
id_to_location
(
'edX/toy/2012_Fall'
)
course
=
module_store
.
get_item
(
course_location
)
course
=
module_store
.
get_item
(
course_location
)
...
...
common/lib/xmodule/xmodule/modulestore/tests/test_mongo.py
View file @
0c1c3f11
...
@@ -11,6 +11,7 @@ from xmodule.tests import DATA_DIR
...
@@ -11,6 +11,7 @@ from xmodule.tests import DATA_DIR
from
xmodule.modulestore
import
Location
from
xmodule.modulestore
import
Location
from
xmodule.modulestore.mongo
import
MongoModuleStore
,
MongoKeyValueStore
from
xmodule.modulestore.mongo
import
MongoModuleStore
,
MongoKeyValueStore
from
xmodule.modulestore.xml_importer
import
import_from_xml
from
xmodule.modulestore.xml_importer
import
import_from_xml
from
xmodule.contentstore.mongo
import
MongoContentStore
from
xmodule.modulestore.tests.test_modulestore
import
check_path_to_location
from
xmodule.modulestore.tests.test_modulestore
import
check_path_to_location
...
@@ -46,9 +47,12 @@ class TestMongoModuleStore(object):
...
@@ -46,9 +47,12 @@ class TestMongoModuleStore(object):
def
initdb
():
def
initdb
():
# connect to the db
# connect to the db
store
=
MongoModuleStore
(
HOST
,
DB
,
COLLECTION
,
FS_ROOT
,
RENDER_TEMPLATE
,
default_class
=
DEFAULT_CLASS
)
store
=
MongoModuleStore
(
HOST
,
DB
,
COLLECTION
,
FS_ROOT
,
RENDER_TEMPLATE
,
default_class
=
DEFAULT_CLASS
)
# since MongoModuleStore and MongoContentStore are basically assumed to be together, create this class
# as well
content_store
=
MongoContentStore
(
HOST
,
DB
)
# Explicitly list the courses to load (don't want the big one)
# Explicitly list the courses to load (don't want the big one)
courses
=
[
'toy'
,
'simple'
]
courses
=
[
'toy'
,
'simple'
]
import_from_xml
(
store
,
DATA_DIR
,
courses
)
import_from_xml
(
store
,
DATA_DIR
,
courses
,
static_content_store
=
content_store
)
return
store
return
store
@staticmethod
@staticmethod
...
...
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