setUpClassAndTestData is tricker than pylint understands
This commit is contained in:
@@ -22,6 +22,7 @@ class TestCourseBookmarksTool(SharedModuleStoreTestCase):
|
||||
"""
|
||||
Set up a course to be used for testing.
|
||||
"""
|
||||
# pylint: disable=super-method-not-called
|
||||
with super(TestCourseBookmarksTool, cls).setUpClassAndTestData():
|
||||
with cls.store.default_store(ModuleStoreEnum.Type.split):
|
||||
cls.course = CourseFactory.create()
|
||||
|
||||
@@ -92,6 +92,7 @@ class CourseHomePageTestCase(SharedModuleStoreTestCase):
|
||||
"""
|
||||
Set up a course to be used for testing.
|
||||
"""
|
||||
# pylint: disable=super-method-not-called
|
||||
with super(CourseHomePageTestCase, cls).setUpClassAndTestData():
|
||||
with cls.store.default_store(ModuleStoreEnum.Type.split):
|
||||
cls.course = CourseFactory.create(
|
||||
|
||||
@@ -49,6 +49,7 @@ class TestCourseOutlinePage(SharedModuleStoreTestCase):
|
||||
Set up an array of various courses to be tested.
|
||||
"""
|
||||
# setUpClassAndTestData() already calls setUpClass on SharedModuleStoreTestCase
|
||||
# pylint: disable=super-method-not-called
|
||||
with super(TestCourseOutlinePage, cls).setUpClassAndTestData():
|
||||
cls.courses = []
|
||||
course = CourseFactory.create()
|
||||
@@ -145,6 +146,7 @@ class TestCourseOutlinePageWithPrerequisites(SharedModuleStoreTestCase, Mileston
|
||||
"""
|
||||
Creates a test course that can be used for non-destructive tests
|
||||
"""
|
||||
# pylint: disable=super-method-not-called
|
||||
|
||||
cls.PREREQ_REQUIRED = '(Prerequisite required)'
|
||||
cls.UNLOCKED = 'Unlocked'
|
||||
@@ -297,6 +299,7 @@ class TestCourseOutlineResumeCourse(SharedModuleStoreTestCase, CompletionWaffleT
|
||||
Creates a test course that can be used for non-destructive tests
|
||||
"""
|
||||
# setUpClassAndTestData() already calls setUpClass on SharedModuleStoreTestCase
|
||||
# pylint: disable=super-method-not-called
|
||||
with super(TestCourseOutlineResumeCourse, cls).setUpClassAndTestData():
|
||||
cls.course = cls.create_test_course()
|
||||
|
||||
|
||||
@@ -83,6 +83,7 @@ class TestCourseUpdatesPage(SharedModuleStoreTestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
"""Set up the simplest course possible."""
|
||||
# pylint: disable=super-method-not-called
|
||||
with super(TestCourseUpdatesPage, cls).setUpClassAndTestData():
|
||||
with cls.store.default_store(ModuleStoreEnum.Type.split):
|
||||
cls.course = CourseFactory.create()
|
||||
|
||||
Reference in New Issue
Block a user