Skip to content

Commit

Permalink
Minor tweaks to reduce conflicts with PR 6492
Browse files Browse the repository at this point in the history
  • Loading branch information
bradenmacdonald committed Jan 9, 2015
1 parent c14a8d6 commit fc76600
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions common/lib/xmodule/xmodule/tests/test_library_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
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
Expand All @@ -27,12 +25,12 @@
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 = [
Expand Down Expand Up @@ -123,10 +121,9 @@ def _create_capa_problems(self):
)


@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):
"""
Expand Down Expand Up @@ -275,9 +272,9 @@ def test_non_editable_settings(self):
@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 """
Expand Down

0 comments on commit fc76600

Please sign in to comment.