TE-2689 Remove useless pylint suppressions part 4
This commit is contained in:
@@ -22,8 +22,6 @@ class TestCourseBookmarksTool(SharedModuleStoreTestCase):
|
||||
"""
|
||||
Set up a course to be used for testing.
|
||||
"""
|
||||
# setUpClassAndTestData() already calls setUpClass on SharedModuleStoreTestCase
|
||||
# pylint: disable=super-method-not-called
|
||||
with super(TestCourseBookmarksTool, cls).setUpClassAndTestData():
|
||||
with cls.store.default_store(ModuleStoreEnum.Type.split):
|
||||
cls.course = CourseFactory.create()
|
||||
|
||||
@@ -25,5 +25,5 @@ def add_course_mode(course, upgrade_deadline_expired=False):
|
||||
mode_slug=CourseMode.VERIFIED,
|
||||
mode_display_name="Verified Certificate",
|
||||
min_price=TEST_COURSE_PRICE,
|
||||
_expiration_datetime=upgrade_exp_date, # pylint: disable=protected-access
|
||||
_expiration_datetime=upgrade_exp_date,
|
||||
).save()
|
||||
|
||||
@@ -89,8 +89,6 @@ class CourseHomePageTestCase(SharedModuleStoreTestCase):
|
||||
"""
|
||||
Set up a course to be used for testing.
|
||||
"""
|
||||
# setUpClassAndTestData() already calls setUpClass on SharedModuleStoreTestCase
|
||||
# pylint: disable=super-method-not-called
|
||||
with super(CourseHomePageTestCase, cls).setUpClassAndTestData():
|
||||
with cls.store.default_store(ModuleStoreEnum.Type.split):
|
||||
cls.course = CourseFactory.create(
|
||||
|
||||
@@ -565,7 +565,7 @@ class TestCourseOutlineResumeCourse(SharedModuleStoreTestCase, CompletionWaffleT
|
||||
switches = waffle.waffle()
|
||||
# pylint: disable=protected-access
|
||||
switch_name = switches._namespaced_name(waffle.ENABLE_COMPLETION_TRACKING)
|
||||
switch, _ = Switch.objects.get_or_create(name=switch_name) # pylint: disable=unpacking-non-sequence
|
||||
switch, _ = Switch.objects.get_or_create(name=switch_name)
|
||||
|
||||
self.assertEqual(switch.created, view._completion_data_collection_start())
|
||||
|
||||
|
||||
@@ -82,8 +82,6 @@ class TestCourseUpdatesPage(SharedModuleStoreTestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
"""Set up the simplest course possible."""
|
||||
# setUpClassAndTestData() already calls setUpClass on SharedModuleStoreTestCase
|
||||
# pylint: disable=super-method-not-called
|
||||
with super(TestCourseUpdatesPage, cls).setUpClassAndTestData():
|
||||
with cls.store.default_store(ModuleStoreEnum.Type.split):
|
||||
cls.course = CourseFactory.create()
|
||||
|
||||
@@ -146,7 +146,7 @@ class EnterpriseApiClient(object):
|
||||
'course_id': course_id,
|
||||
'consent_granted': consent_granted,
|
||||
}
|
||||
endpoint = getattr(self.client, 'enterprise-course-enrollment') # pylint: disable=literal-used-as-attribute
|
||||
endpoint = getattr(self.client, 'enterprise-course-enrollment')
|
||||
try:
|
||||
endpoint.post(data=data)
|
||||
except (HttpClientError, HttpServerError):
|
||||
|
||||
@@ -12,4 +12,4 @@ class EnterpriseSupportConfig(AppConfig):
|
||||
|
||||
def ready(self):
|
||||
# Import signals to activate signal handler for enterprise.
|
||||
from . import signals # pylint: disable=unused-import, unused-variable
|
||||
from . import signals # pylint: disable=unused-variable
|
||||
|
||||
@@ -7,7 +7,7 @@ from django.db.models.signals import post_save
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
from enterprise.models import EnterpriseCustomerUser
|
||||
from email_marketing.tasks import update_user # pylint: disable=import-error
|
||||
from email_marketing.tasks import update_user
|
||||
|
||||
|
||||
@receiver(post_save, sender=EnterpriseCustomerUser)
|
||||
|
||||
@@ -264,7 +264,7 @@ class EnterpriseTestConsentRequired(SimpleTestCase):
|
||||
while(response.status_code == 302 and 'grant_data_sharing_permissions' not in response.url):
|
||||
response = client.get(response.url)
|
||||
self.assertEqual(response.status_code, 302)
|
||||
self.assertIn('grant_data_sharing_permissions', response.url) # pylint: disable=no-member
|
||||
self.assertIn('grant_data_sharing_permissions', response.url)
|
||||
|
||||
# Ensure that when consent is not necessary, the user continues through to the requested page.
|
||||
mock_consent_necessary.return_value = False
|
||||
@@ -273,5 +273,5 @@ class EnterpriseTestConsentRequired(SimpleTestCase):
|
||||
|
||||
# If we were expecting a redirect, ensure it's not to the data sharing permission page
|
||||
if status_code == 302:
|
||||
self.assertNotIn('grant_data_sharing_permissions', response.url) # pylint: disable=no-member
|
||||
self.assertNotIn('grant_data_sharing_permissions', response.url)
|
||||
return response
|
||||
|
||||
@@ -5,7 +5,7 @@ import datetime
|
||||
import ddt
|
||||
import mock
|
||||
|
||||
from lms.djangoapps.certificates.tests.factories import GeneratedCertificateFactory # pylint: disable=import-error
|
||||
from lms.djangoapps.certificates.tests.factories import GeneratedCertificateFactory
|
||||
from lms.djangoapps.certificates.api import is_passing_status
|
||||
from lms.envs.test import CREDENTIALS_PUBLIC_SERVICE_URL
|
||||
from course_modes.models import CourseMode
|
||||
|
||||
Reference in New Issue
Block a user