TE-2689 Remove useless pylint suppressions part 4
This commit is contained in:
@@ -155,27 +155,27 @@ class CoursewarePage(CoursePage, CompletionOnViewMixin):
|
||||
return int(tab_id.split('_')[1])
|
||||
|
||||
@property
|
||||
def _active_sequence_tab(self): # pylint: disable=missing-docstring
|
||||
def _active_sequence_tab(self):
|
||||
return self.q(css='#sequence-list .nav-item.active')
|
||||
|
||||
@property
|
||||
def is_next_button_enabled(self): # pylint: disable=missing-docstring
|
||||
def is_next_button_enabled(self):
|
||||
return not self.q(css='.sequence-nav > .sequence-nav-button.button-next.disabled').is_present()
|
||||
|
||||
@property
|
||||
def is_previous_button_enabled(self): # pylint: disable=missing-docstring
|
||||
def is_previous_button_enabled(self):
|
||||
return not self.q(css='.sequence-nav > .sequence-nav-button.button-previous.disabled').is_present()
|
||||
|
||||
def click_next_button_on_top(self): # pylint: disable=missing-docstring
|
||||
def click_next_button_on_top(self):
|
||||
self._click_navigation_button('sequence-nav', 'button-next')
|
||||
|
||||
def click_next_button_on_bottom(self): # pylint: disable=missing-docstring
|
||||
def click_next_button_on_bottom(self):
|
||||
self._click_navigation_button('sequence-bottom', 'button-next')
|
||||
|
||||
def click_previous_button_on_top(self): # pylint: disable=missing-docstring
|
||||
def click_previous_button_on_top(self):
|
||||
self._click_navigation_button('sequence-nav', 'button-previous')
|
||||
|
||||
def click_previous_button_on_bottom(self): # pylint: disable=missing-docstring
|
||||
def click_previous_button_on_bottom(self):
|
||||
self._click_navigation_button('sequence-bottom', 'button-previous')
|
||||
|
||||
def _click_navigation_button(self, top_or_bottom_class, next_or_previous_class):
|
||||
|
||||
@@ -1480,7 +1480,7 @@ class CertificatesPage(PageObject):
|
||||
return self.get_selector('#btn-start-generating-certificates')
|
||||
|
||||
@property
|
||||
def generate_certificates_disabled_button(self): # pylint: disable=invalid-name
|
||||
def generate_certificates_disabled_button(self):
|
||||
"""
|
||||
Returns the disabled state of button
|
||||
"""
|
||||
@@ -1529,7 +1529,7 @@ class CertificatesPage(PageObject):
|
||||
return self.get_selector('div.certificate-invalidation-container table tr:last-child td')
|
||||
|
||||
@property
|
||||
def certificate_invalidation_message(self): # pylint: disable=invalid-name
|
||||
def certificate_invalidation_message(self):
|
||||
"""
|
||||
Returns the message (error/success) in "Certificate Invalidation" section.
|
||||
"""
|
||||
|
||||
@@ -488,7 +488,6 @@ class XBlockWrapper(PageObject):
|
||||
return self._validation_paragraph('error').present
|
||||
|
||||
@property
|
||||
# pylint: disable=invalid-name
|
||||
def has_validation_not_configured_warning(self):
|
||||
""" Is a validation "not configured" message shown? """
|
||||
return self._validation_paragraph('not-configured').present
|
||||
@@ -508,7 +507,6 @@ class XBlockWrapper(PageObject):
|
||||
return self.q(css=self._bounded_selector('{} .xblock-message-item.error'.format(self.VALIDATION_SELECTOR))).text
|
||||
|
||||
@property
|
||||
# pylint: disable=invalid-name
|
||||
def validation_not_configured_warning_text(self):
|
||||
""" Get the text of the validation "not configured" message. """
|
||||
return self._validation_paragraph('not-configured').text[0]
|
||||
|
||||
@@ -38,7 +38,7 @@ class CourseOutlineItem(object):
|
||||
# Check for the existence of a locator so that errors when navigating to the course outline page don't show up
|
||||
# as errors in the repr method instead.
|
||||
try:
|
||||
return "{}(<browser>, {!r})".format(self.__class__.__name__, self.locator) # pylint: disable=no-member
|
||||
return "{}(<browser>, {!r})".format(self.__class__.__name__, self.locator)
|
||||
except AttributeError:
|
||||
return "{}(<browser>)".format(self.__class__.__name__)
|
||||
|
||||
@@ -1179,7 +1179,7 @@ class SubsectionOutlineModal(CourseOutlineModal):
|
||||
return self.find_css('input[name=content-visibility]:checked').first.attrs('value')[0]
|
||||
|
||||
@is_explicitly_locked.setter
|
||||
def is_explicitly_locked(self, value): # pylint: disable=arguments-differ
|
||||
def is_explicitly_locked(self, value):
|
||||
"""
|
||||
Override - sets visibility to staff_only if True, else 'visible'.
|
||||
|
||||
|
||||
@@ -43,8 +43,8 @@ class BaseDiscussionMixin(object):
|
||||
"""
|
||||
Set up multiple threads on the page by passing 'thread_count'.
|
||||
"""
|
||||
self.thread_ids = [] # pylint: disable=attribute-defined-outside-init
|
||||
threads = [] # pylint: disable=attribute-defined-outside-init
|
||||
self.thread_ids = []
|
||||
threads = []
|
||||
for i in range(thread_count):
|
||||
thread_id = "test_thread_{}_{}".format(i, uuid4().hex)
|
||||
thread_body = "Dummy long text body." * 50
|
||||
|
||||
@@ -414,7 +414,7 @@ class DiscussionTabSingleThreadTest(BaseDiscussionTestCase, DiscussionResponsePa
|
||||
Response(id="response1"),
|
||||
[Comment(id="comment1")])
|
||||
thread_fixture.push()
|
||||
self.setup_thread_page(thread.get("id")) # pylint: disable=no-member
|
||||
self.setup_thread_page(thread.get("id"))
|
||||
|
||||
# Verify that `Add a Post` is not visible on course tab nav.
|
||||
self.assertFalse(self.tab_nav.has_new_post_button_visible_on_tab())
|
||||
|
||||
@@ -29,7 +29,6 @@ class AccountSettingsTestMixin(EventsTestMixin, AcceptanceTest):
|
||||
Visit the account settings page for the current user, and store the page instance
|
||||
as self.account_settings_page.
|
||||
"""
|
||||
# pylint: disable=attribute-defined-outside-init
|
||||
self.account_settings_page = AccountSettingsPage(self.browser)
|
||||
self.account_settings_page.visit()
|
||||
self.account_settings_page.wait_for_ajax()
|
||||
|
||||
@@ -67,7 +67,7 @@ class BookmarksTestMixin(EventsTestMixin, UniqueCourseTest):
|
||||
Arguments:
|
||||
num_chapters: number of chapters to create
|
||||
"""
|
||||
self.course_fixture = CourseFixture( # pylint: disable=attribute-defined-outside-init
|
||||
self.course_fixture = CourseFixture(
|
||||
self.course_info['org'], self.course_info['number'],
|
||||
self.course_info['run'], self.course_info['display_name']
|
||||
)
|
||||
|
||||
@@ -79,7 +79,7 @@ class LearnerProfileTestMixin(EventsTestMixin):
|
||||
|
||||
# Reset event tracking so that the tests only see events from
|
||||
# loading the profile page.
|
||||
self.start_time = datetime.now() # pylint: disable=attribute-defined-outside-init
|
||||
self.start_time = datetime.now()
|
||||
|
||||
# Load the page
|
||||
profile_page.visit()
|
||||
|
||||
@@ -34,7 +34,7 @@ class StaffViewTest(UniqueCourseTest):
|
||||
self.course_info['run'], self.course_info['display_name']
|
||||
)
|
||||
|
||||
self.populate_course_fixture(self.course_fixture) # pylint: disable=no-member
|
||||
self.populate_course_fixture(self.course_fixture)
|
||||
|
||||
self.course_fixture.install()
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ class ProgressPageBaseTest(UniqueCourseTest):
|
||||
def setUp(self):
|
||||
super(ProgressPageBaseTest, self).setUp()
|
||||
self.courseware_page = CoursewarePage(self.browser, self.course_id)
|
||||
self.problem_page = ProblemPage(self.browser) # pylint: disable=attribute-defined-outside-init
|
||||
self.problem_page = ProblemPage(self.browser)
|
||||
self.progress_page = ProgressPage(self.browser, self.course_id)
|
||||
self.logout_page = LogoutPage(self.browser)
|
||||
|
||||
|
||||
@@ -921,7 +921,6 @@ class TeamFormActions(TeamsTabBase):
|
||||
|
||||
def verify_and_navigate_to_edit_team_page(self):
|
||||
"""Navigates to the edit team page and verifies."""
|
||||
# pylint: disable=no-member
|
||||
self.assertEqual(self.team_page.team_name, self.team['name'])
|
||||
self.assertTrue(self.team_page.edit_team_button_present)
|
||||
|
||||
@@ -942,7 +941,6 @@ class TeamFormActions(TeamsTabBase):
|
||||
|
||||
def verify_team_info(self, name, description, location, language):
|
||||
"""Verify the team information on team page."""
|
||||
# pylint: disable=no-member
|
||||
self.assertEqual(self.team_page.team_name, name)
|
||||
self.assertEqual(self.team_page.team_description, description)
|
||||
self.assertEqual(self.team_page.team_location, location)
|
||||
|
||||
@@ -72,7 +72,7 @@ class SignUpAndSignInTest(UniqueCourseTest):
|
||||
"""
|
||||
shard = 21
|
||||
|
||||
def setUp(self): # pylint: disable=arguments-differ
|
||||
def setUp(self):
|
||||
super(SignUpAndSignInTest, self).setUp()
|
||||
self.sign_up_page = SignupPage(self.browser)
|
||||
self.login_page = LoginPage(self.browser)
|
||||
|
||||
@@ -53,7 +53,7 @@ class VideoBaseTest(UniqueCourseTest):
|
||||
Initialization of pages and course fixture for video tests
|
||||
"""
|
||||
super(VideoBaseTest, self).setUp()
|
||||
self.longMessage = True # pylint: disable=invalid-name
|
||||
self.longMessage = True
|
||||
|
||||
self.video = VideoPage(self.browser)
|
||||
self.tab_nav = TabNavPage(self.browser)
|
||||
|
||||
Reference in New Issue
Block a user