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
149c4e78
Commit
149c4e78
authored
Feb 05, 2015
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tests in reaction to ModuleStoreTestCase cleanup.
parent
a89304b9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
10 deletions
+23
-10
cms/djangoapps/contentstore/tests/test_import.py
+2
-1
cms/djangoapps/contentstore/tests/test_utils.py
+1
-1
lms/djangoapps/courseware/management/commands/tests/test_dump_course.py
+20
-8
No files found.
cms/djangoapps/contentstore/tests/test_import.py
View file @
149c4e78
...
...
@@ -91,7 +91,8 @@ class ContentStoreImportTest(ModuleStoreTestCase):
TEST_DATA_DIR
,
[
'2014_Uni'
],
target_course_id
=
course_id
,
create_course_if_not_present
=
True
# When this test is run with split modulestore as the default, the create course option must be specified.
# create_course_if_not_present=True
)
course
=
module_store
.
get_course
(
course_id
)
...
...
cms/djangoapps/contentstore/tests/test_utils.py
View file @
149c4e78
...
...
@@ -203,7 +203,7 @@ class CourseImageTestCase(ModuleStoreTestCase):
)
class
XBlockVisibilityTestCase
(
TestCase
):
class
XBlockVisibilityTestCase
(
ModuleStore
TestCase
):
"""Tests for xblock visibility for students."""
def
setUp
(
self
):
...
...
lms/djangoapps/courseware/management/commands/tests/test_dump_course.py
View file @
149c4e78
...
...
@@ -13,13 +13,13 @@ import factory
from
django.conf
import
settings
from
django.core.management
import
call_command
from
django.test.utils
import
override_settings
from
django.test.testcases
import
TestCase
from
opaque_keys.edx.locations
import
SlashSeparatedCourseKey
from
xmodule.modulestore
import
ModuleStoreEnum
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore.tests.django_utils
import
ModuleStoreTestCase
,
mixed_store_config
from
xmodule.modulestore.tests.django_utils
import
TEST_DATA_MONGO_MODULESTORE
from
xmodule.modulestore.tests.django_utils
import
(
TEST_DATA_MONGO_MODULESTORE
,
TEST_DATA_MONGO_MODULESTORE_SPLIT_DEFAULT
)
from
xmodule.modulestore.tests.factories
import
CourseFactory
from
xmodule.modulestore.xml_importer
import
import_from_xml
...
...
@@ -36,7 +36,7 @@ TEST_DATA_MIXED_XML_MODULESTORE = mixed_store_config(
)
class
CommandsTestBase
(
TestCase
):
class
CommandsTestBase
(
ModuleStore
TestCase
):
"""
Base class for testing different django commands.
...
...
@@ -44,6 +44,7 @@ class CommandsTestBase(TestCase):
to be tested.
"""
__test__
=
False
def
setUp
(
self
):
super
(
CommandsTestBase
,
self
)
.
setUp
()
...
...
@@ -204,17 +205,28 @@ class CommandsTestBase(TestCase):
assert_in
(
'edX-simple-2012_Fall/sequential/Lecture_2.xml'
,
names
)
class
CommandsXMLTestCase
(
CommandsTestBase
,
ModuleStoreTestCase
):
class
CommandsXMLTestCase
(
CommandsTestBase
):
"""
Test case for management commands
using the xml modulestore
.
Test case for management commands
with the xml modulestore present
.
"""
MODULESTORE
=
TEST_DATA_MIXED_XML_MODULESTORE
__test__
=
True
class
CommandsMongoTestCase
(
CommandsTestBase
,
ModuleStoreTestCase
):
class
CommandsMongoTestCase
(
CommandsTestBase
):
"""
Test case for management commands using the mixed mongo modulestore.
Test case for management commands using the mixed mongo modulestore
with old mongo as the default
.
"""
MODULESTORE
=
TEST_DATA_MONGO_MODULESTORE
__test__
=
True
class
CommandSplitMongoTestCase
(
CommandsTestBase
):
"""
Test case for management commands using the mixed mongo modulestore with split as the default.
"""
MODULESTORE
=
TEST_DATA_MONGO_MODULESTORE_SPLIT_DEFAULT
__test__
=
True
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