TE-2689 Remove useless pylint suppressions part 2

This commit is contained in:
Jeremy Bowman
2018-08-14 16:37:25 -04:00
parent de7e2e18b7
commit 1a5bf35357
52 changed files with 90 additions and 137 deletions

View File

@@ -247,7 +247,7 @@ class TestBlocksView(SharedModuleStoreTestCase):
self.verify_response_with_requested_fields(response)
class TestBlocksInCourseView(TestBlocksView): # pylint: disable=test-inherits-tests
class TestBlocksInCourseView(TestBlocksView):
"""
Test class for BlocksInCourseView
"""

View File

@@ -96,7 +96,7 @@ class TestCourseSerializer(CourseApiFactoryMixin, ModuleStoreTestCase):
def test_basic(self):
course = self.create_course()
CourseDetails.update_about_video(course, 'test_youtube_id', self.staff_user.id) # pylint: disable=no-member
CourseDetails.update_about_video(course, 'test_youtube_id', self.staff_user.id)
with check_mongo_calls(self.expected_mongo_calls):
result = self._get_result(course)
self.assertDictEqual(result, self.expected_data)
@@ -139,7 +139,7 @@ class TestCourseSerializer(CourseApiFactoryMixin, ModuleStoreTestCase):
self.assertEqual(result['pacing'], expected_pacing)
class TestCourseDetailSerializer(TestCourseSerializer): # pylint: disable=test-inherits-tests
class TestCourseDetailSerializer(TestCourseSerializer):
"""
Test CourseDetailSerializer by rerunning all the tests
in TestCourseSerializer, but with the

View File

@@ -98,7 +98,7 @@ class CourseListViewTestCase(CourseApiTestViewMixin, SharedModuleStoreTestCase):
def test_missing_username(self):
self.setup_user(self.honor_user)
response_to_missing_username = self.verify_response(expected_status_code=200)
self.assertIsNotNone(response_to_missing_username.data) # pylint: disable=no-member
self.assertIsNotNone(response_to_missing_username.data)
def test_not_logged_in(self):
self.client.logout()
@@ -167,13 +167,13 @@ class CourseListViewTestCaseMultipleCourses(CourseApiTestViewMixin, ModuleStoreT
unfiltered_response = self.verify_response(params={'username': self.staff_user.username})
for org in [self.course.org, alternate_course.org]:
self.assertTrue(
any(course['org'] == org for course in unfiltered_response.data['results']) # pylint: disable=no-member
any(course['org'] == org for course in unfiltered_response.data['results'])
)
# With filtering.
filtered_response = self.verify_response(params={'org': self.course.org, 'username': self.staff_user.username})
self.assertTrue(
all(course['org'] == self.course.org for course in filtered_response.data['results']) # pylint: disable=no-member
all(course['org'] == self.course.org for course in filtered_response.data['results'])
)
def test_filter(self):
@@ -193,7 +193,7 @@ class CourseListViewTestCaseMultipleCourses(CourseApiTestViewMixin, ModuleStoreT
params.update(filter_)
response = self.verify_response(params=params)
self.assertEquals(
{course['course_id'] for course in response.data['results']}, # pylint: disable=no-member
{course['course_id'] for course in response.data['results']},
{unicode(course.id) for course in expected_courses},
"testing course_api.views.CourseListView with filter_={}".format(filter_),
)