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
14a8314a
Commit
14a8314a
authored
Dec 21, 2015
by
John Eskew
Committed by
Clinton Blackburn
May 02, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove include_xml option.
parent
0aa9f906
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
17 deletions
+8
-17
common/djangoapps/embargo/tests/test_api.py
+1
-3
common/lib/xmodule/xmodule/modulestore/tests/django_utils.py
+7
-13
lms/djangoapps/courseware/management/commands/tests/test_dump_course.py
+0
-1
No files found.
common/djangoapps/embargo/tests/test_api.py
View file @
14a8314a
...
...
@@ -34,9 +34,7 @@ from embargo.exceptions import InvalidAccessPoint
from
mock
import
patch
# Since we don't need any XML course fixtures, use a modulestore configuration
# that disables the XML modulestore.
MODULESTORE_CONFIG
=
mixed_store_config
(
settings
.
COMMON_TEST_DATA_ROOT
,
{},
include_xml
=
False
)
MODULESTORE_CONFIG
=
mixed_store_config
(
settings
.
COMMON_TEST_DATA_ROOT
,
{})
@ddt.ddt
...
...
common/lib/xmodule/xmodule/modulestore/tests/django_utils.py
View file @
14a8314a
...
...
@@ -32,7 +32,7 @@ class StoreConstructors(object):
draft
,
split
=
range
(
2
)
def
mixed_store_config
(
data_dir
,
mappings
,
include_xml
=
False
,
xml_source_dirs
=
None
,
store_order
=
None
):
def
mixed_store_config
(
data_dir
,
mappings
,
xml_source_dirs
=
None
,
store_order
=
None
):
"""
Return a `MixedModuleStore` configuration, which provides
access to both Mongo-backed courses.
...
...
@@ -51,11 +51,9 @@ def mixed_store_config(data_dir, mappings, include_xml=False, xml_source_dirs=No
Keyword Args:
include_xml (boolean): If True, include an XML modulestore in the configuration.
xml_source_dirs (list): The directories containing XML courses to load from disk.
note: For the courses to be loaded into the XML modulestore and accessible do the following:
* include_xml should be True
* xml_source_dirs should be the list of directories (relative to data_dir)
containing the courses you want to load
* mappings should be configured, pointing the xml courses to the xml modulestore
...
...
@@ -64,9 +62,6 @@ def mixed_store_config(data_dir, mappings, include_xml=False, xml_source_dirs=No
if
store_order
is
None
:
store_order
=
[
StoreConstructors
.
draft
,
StoreConstructors
.
split
]
if
include_xml
and
StoreConstructors
.
xml
not
in
store_order
:
store_order
.
append
(
StoreConstructors
.
xml
)
store_constructors
=
{
StoreConstructors
.
split
:
split_mongo_store_config
(
data_dir
)[
'default'
],
StoreConstructors
.
draft
:
draft_mongo_store_config
(
data_dir
)[
'default'
],
...
...
@@ -160,25 +155,25 @@ TEST_DATA_DIR = settings.COMMON_TEST_DATA_ROOT
# This modulestore will provide both a mixed mongo editable modulestore, and
# an XML store with just the toy course loaded.
TEST_DATA_MIXED_TOY_MODULESTORE
=
mixed_store_config
(
TEST_DATA_DIR
,
{
'edX/toy/2012_Fall'
:
'xml'
,
},
include_xml
=
True
,
xml_source_dirs
=
[
'toy'
]
TEST_DATA_DIR
,
{
}
,
xml_source_dirs
=
[
'toy'
]
)
# This modulestore will provide both a mixed mongo editable modulestore, and
# an XML store with common/test/data/2014 loaded, which is a course that is closed.
TEST_DATA_MIXED_CLOSED_MODULESTORE
=
mixed_store_config
(
TEST_DATA_DIR
,
{
'edX/detached_pages/2014'
:
'xml'
,
},
include_xml
=
True
,
xml_source_dirs
=
[
'2014'
]
TEST_DATA_DIR
,
{
}
,
xml_source_dirs
=
[
'2014'
]
)
# This modulestore will provide both a mixed mongo editable modulestore, and
# an XML store with common/test/data/graded loaded, which is a course that is graded.
TEST_DATA_MIXED_GRADED_MODULESTORE
=
mixed_store_config
(
TEST_DATA_DIR
,
{
'edX/graded/2012_Fall'
:
'xml'
,
},
include_xml
=
True
,
xml_source_dirs
=
[
'graded'
]
TEST_DATA_DIR
,
{
}
,
xml_source_dirs
=
[
'graded'
]
)
# All store requests now go through mixed
# Use this modulestore if you specifically want to test mongo and not a mocked modulestore.
# This modulestore definition below will not load any xml courses.
TEST_DATA_MONGO_MODULESTORE
=
mixed_store_config
(
mkdtemp_clean
(),
{}
,
include_xml
=
False
)
TEST_DATA_MONGO_MODULESTORE
=
mixed_store_config
(
mkdtemp_clean
(),
{})
# All store requests now go through mixed
# Use this modulestore if you specifically want to test split-mongo and not a mocked modulestore.
...
...
@@ -186,7 +181,6 @@ TEST_DATA_MONGO_MODULESTORE = mixed_store_config(mkdtemp_clean(), {}, include_xm
TEST_DATA_SPLIT_MODULESTORE
=
mixed_store_config
(
mkdtemp_clean
(),
{},
include_xml
=
False
,
store_order
=
[
StoreConstructors
.
split
,
StoreConstructors
.
draft
]
)
...
...
@@ -239,7 +233,7 @@ class SharedModuleStoreTestCase(TestCase):
In Django 1.8, we will be able to use setUpTestData() to do class level init
for Django ORM models that will get cleaned up properly.
"""
MODULESTORE
=
mixed_store_config
(
mkdtemp_clean
(),
{}
,
include_xml
=
False
)
MODULESTORE
=
mixed_store_config
(
mkdtemp_clean
(),
{})
# Tell Django to clean out all databases, not just default
multi_db
=
True
...
...
@@ -403,7 +397,7 @@ class ModuleStoreTestCase(TestCase):
your `setUp()` method.
"""
MODULESTORE
=
mixed_store_config
(
mkdtemp_clean
(),
{}
,
include_xml
=
False
)
MODULESTORE
=
mixed_store_config
(
mkdtemp_clean
(),
{})
# Tell Django to clean out all databases, not just default
multi_db
=
True
...
...
lms/djangoapps/courseware/management/commands/tests/test_dump_course.py
View file @
14a8314a
...
...
@@ -24,7 +24,6 @@ from xmodule.modulestore.tests.factories import CourseFactory
from
xmodule.modulestore.xml_importer
import
import_course_from_xml
DATA_DIR
=
settings
.
COMMON_TEST_DATA_ROOT
XML_COURSE_DIRS
=
[
'toy'
,
'simple'
]
@attr
(
'shard_1'
)
...
...
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