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
134a75b3
Commit
134a75b3
authored
Jan 08, 2015
by
Braden MacDonald
Committed by
E. Kolpakov
Jan 12, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor tweaks to reduce conflicts with PR 6492
parent
6a2af3eb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
12 deletions
+9
-12
common/lib/xmodule/xmodule/tests/test_library_content.py
+9
-12
No files found.
common/lib/xmodule/xmodule/tests/test_library_content.py
View file @
134a75b3
...
...
@@ -4,12 +4,10 @@ Basic unit tests for LibraryContentModule
Higher-level tests are in `cms/djangoapps/contentstore/tests/test_libraries.py`.
"""
import
ddt
from
mock
import
patch
from
unittest
import
TestCase
from
bson.objectid
import
ObjectId
from
mock
import
patch
from
opaque_keys.edx.locator
import
LibraryLocator
from
unittest
import
TestCase
from
xblock.fragment
import
Fragment
from
xblock.runtime
import
Runtime
as
VanillaRuntime
...
...
@@ -27,12 +25,12 @@ from xmodule.validation import StudioValidationMessage
dummy_render
=
lambda
block
,
_
:
Fragment
(
block
.
data
)
# pylint: disable=invalid-name
class
BaseTestLibraryContainer
(
MixedSplitTestCase
):
class
LibraryContentTest
(
MixedSplitTestCase
):
"""
Base class for
TestLibraryContainer and TestLibraryContainerRender
Base class for
tests of LibraryContentModule (library_content_module.py)
"""
def
setUp
(
self
):
super
(
BaseTestLibraryContainer
,
self
)
.
setUp
()
super
(
LibraryContentTest
,
self
)
.
setUp
()
self
.
library
=
LibraryFactory
.
create
(
modulestore
=
self
.
store
)
self
.
lib_blocks
=
[
...
...
@@ -123,10 +121,9 @@ class BaseTestLibraryContainer(MixedSplitTestCase):
)
@ddt.ddt
class
TestLibraryContainer
(
BaseTestLibraryContainer
):
class
TestLibraryContentModule
(
LibraryContentTest
):
"""
Basic unit tests for LibraryContentModule
(library_content_module.py)
Basic unit tests for LibraryContentModule
"""
def
test_lib_content_block
(
self
):
"""
...
...
@@ -275,9 +272,9 @@ class TestLibraryContainer(BaseTestLibraryContainer):
@patch
(
'xmodule.modulestore.split_mongo.caching_descriptor_system.CachingDescriptorSystem.render'
,
VanillaRuntime
.
render
)
@patch
(
'xmodule.html_module.HtmlModule.author_view'
,
dummy_render
,
create
=
True
)
@patch
(
'xmodule.x_module.DescriptorSystem.applicable_aside_types'
,
lambda
self
,
block
:
[])
class
TestLibraryContentRender
(
BaseTestLibraryContainer
):
class
TestLibraryContentRender
(
LibraryContentTest
):
"""
Rendering unit tests for LibraryContentModule
(library_content_module.py)
Rendering unit tests for LibraryContentModule
"""
def
test_preivew_view
(
self
):
""" Test preview view rendering """
...
...
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