Remove a number of unneeded super()-delegation methods
This commit is contained in:
@@ -40,10 +40,7 @@ class DatabaseMicrositeBackendTests(DatabaseMicrositeTestCase):
|
||||
"""
|
||||
def setUp(self):
|
||||
super(DatabaseMicrositeBackendTests, self).setUp()
|
||||
|
||||
def tearDown(self):
|
||||
super(DatabaseMicrositeBackendTests, self).tearDown()
|
||||
microsite.clear()
|
||||
self.addCleanup(microsite.clear)
|
||||
|
||||
def test_get_value(self):
|
||||
"""
|
||||
|
||||
@@ -22,9 +22,6 @@ class TestMicrosites(DatabaseMicrositeTestCase):
|
||||
Run through some Microsite logic
|
||||
"""
|
||||
|
||||
def setUp(self):
|
||||
super(TestMicrosites, self).setUp()
|
||||
|
||||
@ddt.data(*MICROSITE_BACKENDS)
|
||||
def test_get_value_for_org_when_microsite_has_no_org(self, site_backend):
|
||||
"""
|
||||
|
||||
@@ -236,9 +236,6 @@ class CanonicalContentTest(SharedModuleStoreTestCase):
|
||||
set, CDN not set, etc.
|
||||
"""
|
||||
|
||||
def setUp(self):
|
||||
super(CanonicalContentTest, self).setUp()
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.courses = {}
|
||||
|
||||
@@ -214,8 +214,7 @@ class OrgRole(RoleBase):
|
||||
"""
|
||||
A named role in a particular org independent of course
|
||||
"""
|
||||
def __init__(self, role, org):
|
||||
super(OrgRole, self).__init__(role, org)
|
||||
pass
|
||||
|
||||
|
||||
@register_access_role
|
||||
|
||||
@@ -94,9 +94,6 @@ class ActivationEmailTests(TestCase):
|
||||
"This email message was automatically sent by edx.org"
|
||||
]
|
||||
|
||||
def setUp(self):
|
||||
super(ActivationEmailTests, self).setUp()
|
||||
|
||||
def test_activation_email(self):
|
||||
self._create_account()
|
||||
self._assert_activation_email(self.ACTIVATION_SUBJECT, self.OPENEDX_FRAGMENTS)
|
||||
|
||||
@@ -41,12 +41,6 @@ class CapaModule(CapaMixin, XModule):
|
||||
js_module_name = "Problem"
|
||||
css = {'scss': [resource_string(__name__, 'css/capa/display.scss')]}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
"""
|
||||
Accepts the same arguments as xmodule.x_module:XModule.__init__
|
||||
"""
|
||||
super(CapaModule, self).__init__(*args, **kwargs)
|
||||
|
||||
def author_view(self, context):
|
||||
"""
|
||||
Renders the Studio preview view.
|
||||
|
||||
@@ -341,9 +341,6 @@ class CachingDescriptorSystem(MakoDescriptorSystem, EditInfoRuntimeMixin):
|
||||
key = UsageKey.from_string(ref_string)
|
||||
return key.replace(run=self.modulestore.fill_in_run(key.course_key).run)
|
||||
|
||||
def __setattr__(self, name, value):
|
||||
return super(CachingDescriptorSystem, self).__setattr__(name, value)
|
||||
|
||||
def _convert_reference_fields_to_keys(self, class_, course_key, jsonfields):
|
||||
"""
|
||||
Find all fields of type reference and convert the payload into UsageKeys
|
||||
|
||||
@@ -2039,12 +2039,6 @@ class TestPublish(SplitModuleTest):
|
||||
"""
|
||||
Test the publishing api
|
||||
"""
|
||||
def setUp(self):
|
||||
super(TestPublish, self).setUp()
|
||||
|
||||
def tearDown(self):
|
||||
SplitModuleTest.tearDown(self)
|
||||
|
||||
@patch('xmodule.tabs.CourseTab.from_json', side_effect=mock_tab_from_json)
|
||||
def test_publish_safe(self, _from_json):
|
||||
"""
|
||||
|
||||
@@ -11,14 +11,6 @@ class DashboardPage(PageObject):
|
||||
Student dashboard, where the student can view
|
||||
courses she/he has registered for.
|
||||
"""
|
||||
def __init__(self, browser):
|
||||
"""Initialize the page.
|
||||
|
||||
Arguments:
|
||||
browser (Browser): The browser instance.
|
||||
"""
|
||||
super(DashboardPage, self).__init__(browser)
|
||||
|
||||
url = "{base}/dashboard".format(base=BASE_URL)
|
||||
|
||||
def is_browser_on_page(self):
|
||||
|
||||
@@ -14,14 +14,6 @@ class IndexPage(PageObject):
|
||||
"""
|
||||
LMS index (home) page, the default landing page for Open edX users when they are not logged in
|
||||
"""
|
||||
def __init__(self, browser):
|
||||
"""Initialize the page.
|
||||
|
||||
Arguments:
|
||||
browser (Browser): The browser instance.
|
||||
"""
|
||||
super(IndexPage, self).__init__(browser)
|
||||
|
||||
url = "{base}/".format(base=BASE_URL)
|
||||
|
||||
def is_browser_on_page(self):
|
||||
|
||||
@@ -71,9 +71,6 @@ class ResetPasswordPage(PageObject):
|
||||
"""
|
||||
url = BASE_URL + "/login#forgot-password-modal"
|
||||
|
||||
def __init__(self, browser):
|
||||
super(ResetPasswordPage, self).__init__(browser)
|
||||
|
||||
def is_browser_on_page(self):
|
||||
return (
|
||||
self.q(css="#login-anchor").is_present() and
|
||||
|
||||
@@ -171,9 +171,6 @@ class FakeSoftwareSecureVerificationPage(PageObject):
|
||||
|
||||
url = BASE_URL + '/verify_student/software-secure-fake-response'
|
||||
|
||||
def __init__(self, browser):
|
||||
super(FakeSoftwareSecureVerificationPage, self).__init__(browser)
|
||||
|
||||
def is_browser_on_page(self):
|
||||
""" Determine if browser is on the page. """
|
||||
message = self.q(css='BODY').text[0]
|
||||
|
||||
@@ -10,13 +10,6 @@ class MoveModalView(PageObject):
|
||||
A base class for move xblock
|
||||
"""
|
||||
|
||||
def __init__(self, browser):
|
||||
"""
|
||||
Arguments:
|
||||
browser (selenium.webdriver): The Selenium-controlled browser that this page is loaded in.
|
||||
"""
|
||||
super(MoveModalView, self).__init__(browser)
|
||||
|
||||
def is_browser_on_page(self):
|
||||
return self.q(css='.modal-window.move-modal').present
|
||||
|
||||
|
||||
@@ -1109,9 +1109,6 @@ class SubsectionOutlineModal(CourseOutlineModal):
|
||||
Subclass to handle a few special cases with subsection modals.
|
||||
"""
|
||||
|
||||
def __init__(self, page):
|
||||
super(SubsectionOutlineModal, self).__init__(page)
|
||||
|
||||
@property
|
||||
def is_explicitly_locked(self):
|
||||
"""
|
||||
|
||||
@@ -11,13 +11,6 @@ class CrowdsourcehinterProblemPage(PageObject):
|
||||
|
||||
url = None
|
||||
|
||||
def __init__(self, browser):
|
||||
"""
|
||||
Args:
|
||||
browser (selenium.webdriver): The Selenium-controlled browser that this page is loaded in.
|
||||
"""
|
||||
super(CrowdsourcehinterProblemPage, self).__init__(browser)
|
||||
|
||||
def is_browser_on_page(self):
|
||||
return len(self.browser.find_elements_by_class_name('crowdsourcehinter_block')) > 0
|
||||
|
||||
|
||||
@@ -723,12 +723,6 @@ class UniqueCourseTest(AcceptanceTest):
|
||||
Test that provides a unique course ID.
|
||||
"""
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
"""
|
||||
Create a unique course ID.
|
||||
"""
|
||||
super(UniqueCourseTest, self).__init__(*args, **kwargs)
|
||||
|
||||
def setUp(self):
|
||||
super(UniqueCourseTest, self).setUp()
|
||||
|
||||
|
||||
@@ -132,12 +132,6 @@ class BookmarksTest(BookmarksTestMixin):
|
||||
Tests to verify bookmarks functionality.
|
||||
"""
|
||||
|
||||
def setUp(self):
|
||||
"""
|
||||
Initialize test setup.
|
||||
"""
|
||||
super(BookmarksTest, self).setUp()
|
||||
|
||||
def _breadcrumb(self, num_units, modified_name=None):
|
||||
"""
|
||||
Creates breadcrumbs for the first `num_units`
|
||||
|
||||
@@ -127,9 +127,6 @@ class CourseHomeA11yTest(CourseHomeBaseTest):
|
||||
Tests the accessibility of the course home page with course outline.
|
||||
"""
|
||||
|
||||
def setUp(self):
|
||||
super(CourseHomeA11yTest, self).setUp()
|
||||
|
||||
def test_course_home_a11y(self):
|
||||
"""
|
||||
Test the accessibility of the course home page with course outline.
|
||||
|
||||
@@ -1239,9 +1239,6 @@ class EcommerceTest(BaseInstructorDashboardTest):
|
||||
"""
|
||||
Bok Choy tests for the "E-Commerce" tab.
|
||||
"""
|
||||
def setUp(self):
|
||||
super(EcommerceTest, self).setUp()
|
||||
|
||||
def setup_course(self, course_number):
|
||||
"""
|
||||
Sets up the course
|
||||
|
||||
@@ -13,9 +13,6 @@ class VideoEditorTest(CMSVideoBaseTest):
|
||||
CMS Video Editor Test Class
|
||||
"""
|
||||
|
||||
def setUp(self):
|
||||
super(VideoEditorTest, self).setUp()
|
||||
|
||||
def _create_video_component(self, subtitles=False):
|
||||
"""
|
||||
Create a video component and navigate to unit page
|
||||
|
||||
@@ -28,9 +28,6 @@ class VideoTranscriptTest(CMSVideoBaseTest):
|
||||
CMS Video Transcript Test Class
|
||||
"""
|
||||
|
||||
def setUp(self):
|
||||
super(VideoTranscriptTest, self).setUp()
|
||||
|
||||
def _create_video_component(self, subtitles=False, subtitle_id='3_yD_cEKoCk'):
|
||||
"""
|
||||
Create a video component and navigate to unit page
|
||||
|
||||
@@ -13,9 +13,6 @@ class VideoHandoutTest(CMSVideoBaseTest):
|
||||
CMS Video Handout Test Class
|
||||
"""
|
||||
|
||||
def setUp(self):
|
||||
super(VideoHandoutTest, self).setUp()
|
||||
|
||||
def _create_course_unit_with_handout(self, handout_filename, save_settings=True):
|
||||
"""
|
||||
Create a course with unit and also upload handout
|
||||
|
||||
@@ -218,9 +218,6 @@ class VideoBaseTest(UniqueCourseTest):
|
||||
class YouTubeVideoTest(VideoBaseTest):
|
||||
""" Test YouTube Video Player """
|
||||
|
||||
def setUp(self):
|
||||
super(YouTubeVideoTest, self).setUp()
|
||||
|
||||
def test_youtube_video_rendering_wo_html5_sources(self):
|
||||
"""
|
||||
Scenario: Video component is rendered in the LMS in Youtube mode without HTML5 sources
|
||||
@@ -944,9 +941,6 @@ class YouTubeVideoTest(VideoBaseTest):
|
||||
class YouTubeHtml5VideoTest(VideoBaseTest):
|
||||
""" Test YouTube HTML5 Video Player """
|
||||
|
||||
def setUp(self):
|
||||
super(YouTubeHtml5VideoTest, self).setUp()
|
||||
|
||||
@flaky # TODO fix this, see TNL-1642
|
||||
def test_youtube_video_rendering_with_unsupported_sources(self):
|
||||
"""
|
||||
@@ -966,9 +960,6 @@ class YouTubeHtml5VideoTest(VideoBaseTest):
|
||||
class Html5VideoTest(VideoBaseTest):
|
||||
""" Test HTML5 Video Player """
|
||||
|
||||
def setUp(self):
|
||||
super(Html5VideoTest, self).setUp()
|
||||
|
||||
def test_autoplay_disabled_for_video_component(self):
|
||||
"""
|
||||
Scenario: Autoplay is disabled by default for a Video component
|
||||
@@ -1154,9 +1145,6 @@ class Html5VideoTest(VideoBaseTest):
|
||||
class YouTubeQualityTest(VideoBaseTest):
|
||||
""" Test YouTube Video Quality Button """
|
||||
|
||||
def setUp(self):
|
||||
super(YouTubeQualityTest, self).setUp()
|
||||
|
||||
@skip_if_browser('firefox')
|
||||
def test_quality_button_visibility(self):
|
||||
"""
|
||||
@@ -1204,9 +1192,6 @@ class DragAndDropTest(VideoBaseTest):
|
||||
"""
|
||||
Tests draggability of closed captions within videos.
|
||||
"""
|
||||
def setUp(self):
|
||||
super(DragAndDropTest, self).setUp()
|
||||
|
||||
def test_if_captions_are_draggable(self):
|
||||
"""
|
||||
Loads transcripts so that closed-captioning is available.
|
||||
|
||||
@@ -7,9 +7,6 @@ from common.test.acceptance.tests.video.test_video_module import VideoBaseTest
|
||||
class VideoTimesTest(VideoBaseTest):
|
||||
""" Test Video Player Times """
|
||||
|
||||
def setUp(self):
|
||||
super(VideoTimesTest, self).setUp()
|
||||
|
||||
def test_video_start_time(self):
|
||||
"""
|
||||
Scenario: Start time works for Youtube video
|
||||
|
||||
Reference in New Issue
Block a user