Update edx-search, fix lms filter generator and courseware index tests

This commit is contained in:
Davorin Sego
2015-07-16 10:32:04 +02:00
parent 845e1d6296
commit a43cf589e0
6 changed files with 10 additions and 14 deletions

View File

@@ -4,6 +4,7 @@ Test courseware search
import os
import json
from ..helpers import remove_file
from ...pages.common.logout import LogoutPage
from ...pages.studio.overview import CourseOutlinePage
from ...pages.lms.courseware_search import CoursewareSearchPage
@@ -40,6 +41,7 @@ class CoursewareSearchCohortTest(ContainerBase):
# create test file in which index for this test will live
with open(self.TEST_INDEX_FILENAME, "w+") as index_file:
json.dump({}, index_file)
self.addCleanup(remove_file, self.TEST_INDEX_FILENAME)
super(CoursewareSearchCohortTest, self).setUp(is_staff=is_staff)
self.staff_user = self.user
@@ -79,10 +81,6 @@ class CoursewareSearchCohortTest(ContainerBase):
self._studio_reindex()
def tearDown(self):
super(CoursewareSearchCohortTest, self).tearDown()
os.remove(self.TEST_INDEX_FILENAME)
def _auto_auth(self, username, email, staff):
"""
Logout and login with given credentials.

View File

@@ -4,6 +4,7 @@ Test courseware search
import os
import json
from ..helpers import remove_file
from ...pages.common.logout import LogoutPage
from ...pages.studio.overview import CourseOutlinePage
from ...pages.lms.courseware_search import CoursewareSearchPage
@@ -37,6 +38,7 @@ class SplitTestCoursewareSearchTest(ContainerBase):
# create test file in which index for this test will live
with open(self.TEST_INDEX_FILENAME, "w+") as index_file:
json.dump({}, index_file)
self.addCleanup(remove_file, self.TEST_INDEX_FILENAME)
super(SplitTestCoursewareSearchTest, self).setUp(is_staff=is_staff)
self.staff_user = self.user
@@ -53,10 +55,6 @@ class SplitTestCoursewareSearchTest(ContainerBase):
self._add_and_configure_split_test()
self._studio_reindex()
def tearDown(self):
super(SplitTestCoursewareSearchTest, self).tearDown()
os.remove(self.TEST_INDEX_FILENAME)
def _auto_auth(self, username, email, staff):
"""
Logout and login with given credentials.