Commit 89443cf5 by E. Kolpakov

Fixed broken test

parent 77cc80f6
...@@ -28,7 +28,7 @@ class SearchIndexingError(Exception): ...@@ -28,7 +28,7 @@ class SearchIndexingError(Exception):
self.error_list = error_list self.error_list = error_list
class SearchIndexBase(object): class SearchIndexerBase(object):
""" """
Base class to perform indexing for courseware or library search from different modulestores Base class to perform indexing for courseware or library search from different modulestores
""" """
...@@ -204,7 +204,7 @@ class SearchIndexBase(object): ...@@ -204,7 +204,7 @@ class SearchIndexBase(object):
Arguments: Arguments:
event_name (str): Name of the event to be logged. event_name (str): Name of the event to be logged.
category (str): cat3gory of indexed items category (str): category of indexed items
indexed_count (int): number of indexed items indexed_count (int): number of indexed items
Returns: Returns:
None None
...@@ -221,7 +221,7 @@ class SearchIndexBase(object): ...@@ -221,7 +221,7 @@ class SearchIndexBase(object):
) )
class CoursewareSearchIndexer(SearchIndexBase): class CoursewareSearchIndexer(SearchIndexerBase):
""" """
Class to perform indexing for courseware search from different modulestores Class to perform indexing for courseware search from different modulestores
""" """
...@@ -257,7 +257,7 @@ class CoursewareSearchIndexer(SearchIndexBase): ...@@ -257,7 +257,7 @@ class CoursewareSearchIndexer(SearchIndexBase):
return cls._do_reindex(modulestore, course_key) return cls._do_reindex(modulestore, course_key)
class LibrarySearchIndexer(SearchIndexBase): class LibrarySearchIndexer(SearchIndexerBase):
""" """
Base class to perform indexing for library search from different modulestores Base class to perform indexing for library search from different modulestores
""" """
......
...@@ -7,7 +7,7 @@ import textwrap ...@@ -7,7 +7,7 @@ import textwrap
from .base_studio_test import StudioLibraryTest from .base_studio_test import StudioLibraryTest
from ...fixtures.course import CourseFixture from ...fixtures.course import CourseFixture
from ..helpers import UniqueCourseTest from ..helpers import UniqueCourseTest, TestWithSearchIndexMixin
from ...pages.studio.library import StudioLibraryContentEditor, StudioLibraryContainerXBlockWrapper from ...pages.studio.library import StudioLibraryContentEditor, StudioLibraryContainerXBlockWrapper
from ...pages.studio.overview import CourseOutlinePage from ...pages.studio.overview import CourseOutlinePage
from ...fixtures.course import XBlockFixtureDesc from ...fixtures.course import XBlockFixtureDesc
...@@ -18,7 +18,7 @@ UNIT_NAME = 'Test Unit' ...@@ -18,7 +18,7 @@ UNIT_NAME = 'Test Unit'
@ddt.ddt @ddt.ddt
class StudioLibraryContainerTest(StudioLibraryTest, UniqueCourseTest): class StudioLibraryContainerTest(StudioLibraryTest, UniqueCourseTest, TestWithSearchIndexMixin):
""" """
Test Library Content block in LMS Test Library Content block in LMS
""" """
...@@ -26,6 +26,7 @@ class StudioLibraryContainerTest(StudioLibraryTest, UniqueCourseTest): ...@@ -26,6 +26,7 @@ class StudioLibraryContainerTest(StudioLibraryTest, UniqueCourseTest):
""" """
Install library with some content and a course using fixtures Install library with some content and a course using fixtures
""" """
self._create_search_index()
super(StudioLibraryContainerTest, self).setUp() super(StudioLibraryContainerTest, self).setUp()
# Also create a course: # Also create a course:
self.course_fixture = CourseFixture( self.course_fixture = CourseFixture(
...@@ -42,6 +43,11 @@ class StudioLibraryContainerTest(StudioLibraryTest, UniqueCourseTest): ...@@ -42,6 +43,11 @@ class StudioLibraryContainerTest(StudioLibraryTest, UniqueCourseTest):
subsection = self.outline.section(SECTION_NAME).subsection(SUBSECTION_NAME) subsection = self.outline.section(SECTION_NAME).subsection(SUBSECTION_NAME)
self.unit_page = subsection.expand_subsection().unit(UNIT_NAME).go_to() self.unit_page = subsection.expand_subsection().unit(UNIT_NAME).go_to()
def tearDown(self):
""" Tear down method: remove search index backing file """
self._cleanup_index_file()
super(StudioLibraryContainerTest, self).tearDown()
def populate_library_fixture(self, library_fixture): def populate_library_fixture(self, library_fixture):
""" """
Populate the children of the test course fixture. Populate the children of the test course fixture.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment