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
6ea91d42
Commit
6ea91d42
authored
Apr 12, 2016
by
John Eskew
Committed by
Clinton Blackburn
May 02, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove another XML course test.
parent
f0c13180
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
36 deletions
+3
-36
common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py
+1
-2
lms/djangoapps/courseware/tests/test_courses.py
+2
-34
No files found.
common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py
View file @
6ea91d42
...
...
@@ -88,7 +88,6 @@ class CommonMixedModuleStoreSetup(CourseComparisonTest):
'collection'
:
COLLECTION
,
'asset_collection'
:
ASSET_COLLECTION
,
}
MAPPINGS
=
{}
OPTIONS
=
{
'stores'
:
[
{
...
...
@@ -241,7 +240,7 @@ class CommonMixedModuleStoreSetup(CourseComparisonTest):
return
self
.
store
.
has_changes
(
self
.
store
.
get_item
(
location
))
# pylint: disable=dangerous-default-value
def
_initialize_mixed
(
self
,
mappings
=
MAPPINGS
,
contentstore
=
None
):
def
_initialize_mixed
(
self
,
mappings
=
{}
,
contentstore
=
None
):
"""
initializes the mixed modulestore.
"""
...
...
lms/djangoapps/courseware/tests/test_courses.py
View file @
6ea91d42
...
...
@@ -32,12 +32,9 @@ from student.tests.factories import UserFactory
from
xmodule.modulestore.django
import
_get_modulestore_branch_setting
,
modulestore
from
xmodule.modulestore
import
ModuleStoreEnum
from
xmodule.modulestore.xml_importer
import
import_course_from_xml
from
xmodule.modulestore.tests.django_utils
import
(
ModuleStoreTestCase
,
TEST_DATA_MIXED_MODULESTORE
)
from
xmodule.modulestore.tests.django_utils
import
ModuleStoreTestCase
from
xmodule.modulestore.tests.factories
import
(
CourseFactory
,
ItemFactory
,
ToyCourseFactory
,
check_mongo_calls
CourseFactory
,
ItemFactory
,
check_mongo_calls
)
from
xmodule.tests.xml
import
factories
as
xml
from
xmodule.tests.xml
import
XModuleXmlImportTest
...
...
@@ -308,35 +305,6 @@ class CoursesRenderTest(ModuleStoreTestCase):
@attr
(
'shard_1'
)
class
XmlCoursesRenderTest
(
ModuleStoreTestCase
):
"""Test methods related to rendering courses content for an XML course."""
MODULESTORE
=
TEST_DATA_MIXED_MODULESTORE
def
setUp
(
self
):
"""
Make sure that course is reloaded every time--clear out the modulestore.
"""
super
(
XmlCoursesRenderTest
,
self
)
.
setUp
()
self
.
toy_course_key
=
ToyCourseFactory
.
create
()
.
id
def
test_get_course_info_section_render
(
self
):
course
=
get_course_by_id
(
self
.
toy_course_key
)
request
=
get_request_for_user
(
UserFactory
.
create
())
# Test render works okay. Note the href is different in XML courses.
course_info
=
get_course_info_section
(
request
,
request
.
user
,
course
,
'handouts'
)
self
.
assertEqual
(
course_info
,
"<a href='/static/toy/handouts/sample_handout.txt'>Sample</a>"
)
# Test when render raises an exception
with
mock
.
patch
(
'courseware.courses.get_module'
)
as
mock_module_render
:
mock_module_render
.
return_value
=
mock
.
MagicMock
(
render
=
mock
.
Mock
(
side_effect
=
Exception
(
'Render failed!'
))
)
course_info
=
get_course_info_section
(
request
,
request
.
user
,
course
,
'handouts'
)
self
.
assertIn
(
"this module is temporarily unavailable"
,
course_info
)
@attr
(
'shard_1'
)
@ddt.ddt
class
CourseInstantiationTests
(
ModuleStoreTestCase
):
"""
...
...
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