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
89443cf5
Commit
89443cf5
authored
Apr 14, 2015
by
E. Kolpakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed broken test
parent
77cc80f6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
cms/djangoapps/contentstore/courseware_index.py
+4
-4
common/test/acceptance/tests/studio/test_studio_library_container.py
+8
-2
No files found.
cms/djangoapps/contentstore/courseware_index.py
View file @
89443cf5
...
...
@@ -28,7 +28,7 @@ class SearchIndexingError(Exception):
self
.
error_list
=
error_list
class
SearchIndexBase
(
object
):
class
SearchIndex
er
Base
(
object
):
"""
Base class to perform indexing for courseware or library search from different modulestores
"""
...
...
@@ -204,7 +204,7 @@ class SearchIndexBase(object):
Arguments:
event_name (str): Name of the event to be logged.
category (str): cat
3
gory of indexed items
category (str): cat
e
gory of indexed items
indexed_count (int): number of indexed items
Returns:
None
...
...
@@ -221,7 +221,7 @@ class SearchIndexBase(object):
)
class
CoursewareSearchIndexer
(
SearchIndexBase
):
class
CoursewareSearchIndexer
(
SearchIndex
er
Base
):
"""
Class to perform indexing for courseware search from different modulestores
"""
...
...
@@ -257,7 +257,7 @@ class CoursewareSearchIndexer(SearchIndexBase):
return
cls
.
_do_reindex
(
modulestore
,
course_key
)
class
LibrarySearchIndexer
(
SearchIndexBase
):
class
LibrarySearchIndexer
(
SearchIndex
er
Base
):
"""
Base class to perform indexing for library search from different modulestores
"""
...
...
common/test/acceptance/tests/studio/test_studio_library_container.py
View file @
89443cf5
...
...
@@ -7,7 +7,7 @@ import textwrap
from
.base_studio_test
import
StudioLibraryTest
from
...fixtures.course
import
CourseFixture
from
..helpers
import
UniqueCourseTest
from
..helpers
import
UniqueCourseTest
,
TestWithSearchIndexMixin
from
...pages.studio.library
import
StudioLibraryContentEditor
,
StudioLibraryContainerXBlockWrapper
from
...pages.studio.overview
import
CourseOutlinePage
from
...fixtures.course
import
XBlockFixtureDesc
...
...
@@ -18,7 +18,7 @@ UNIT_NAME = 'Test Unit'
@ddt.ddt
class
StudioLibraryContainerTest
(
StudioLibraryTest
,
UniqueCourseTest
):
class
StudioLibraryContainerTest
(
StudioLibraryTest
,
UniqueCourseTest
,
TestWithSearchIndexMixin
):
"""
Test Library Content block in LMS
"""
...
...
@@ -26,6 +26,7 @@ class StudioLibraryContainerTest(StudioLibraryTest, UniqueCourseTest):
"""
Install library with some content and a course using fixtures
"""
self
.
_create_search_index
()
super
(
StudioLibraryContainerTest
,
self
)
.
setUp
()
# Also create a course:
self
.
course_fixture
=
CourseFixture
(
...
...
@@ -42,6 +43,11 @@ class StudioLibraryContainerTest(StudioLibraryTest, UniqueCourseTest):
subsection
=
self
.
outline
.
section
(
SECTION_NAME
)
.
subsection
(
SUBSECTION_NAME
)
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
):
"""
Populate the children of the test course fixture.
...
...
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