Commit b4d24f36 by Sarina Canelake

s/pylint: disable=E1103/pylint: disable=maybe-no-member/

parent b8c16d5e
...@@ -69,7 +69,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase): ...@@ -69,7 +69,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
""" """
self.client.logout() self.client.logout()
resp = self.client.get(self.url_unlocked) resp = self.client.get(self.url_unlocked)
self.assertEqual(resp.status_code, 200) # pylint: disable=E1103 self.assertEqual(resp.status_code, 200)
def test_locked_asset_not_logged_in(self): def test_locked_asset_not_logged_in(self):
""" """
...@@ -78,7 +78,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase): ...@@ -78,7 +78,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
""" """
self.client.logout() self.client.logout()
resp = self.client.get(self.url_locked) resp = self.client.get(self.url_locked)
self.assertEqual(resp.status_code, 403) # pylint: disable=E1103 self.assertEqual(resp.status_code, 403)
def test_locked_asset_not_registered(self): def test_locked_asset_not_registered(self):
""" """
...@@ -87,7 +87,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase): ...@@ -87,7 +87,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
""" """
self.client.login(username=self.non_staff_usr, password=self.non_staff_pwd) self.client.login(username=self.non_staff_usr, password=self.non_staff_pwd)
resp = self.client.get(self.url_locked) resp = self.client.get(self.url_locked)
self.assertEqual(resp.status_code, 403) # pylint: disable=E1103 self.assertEqual(resp.status_code, 403)
def test_locked_asset_registered(self): def test_locked_asset_registered(self):
""" """
...@@ -99,7 +99,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase): ...@@ -99,7 +99,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
self.client.login(username=self.non_staff_usr, password=self.non_staff_pwd) self.client.login(username=self.non_staff_usr, password=self.non_staff_pwd)
resp = self.client.get(self.url_locked) resp = self.client.get(self.url_locked)
self.assertEqual(resp.status_code, 200) # pylint: disable=E1103 self.assertEqual(resp.status_code, 200)
def test_locked_asset_staff(self): def test_locked_asset_staff(self):
""" """
...@@ -107,7 +107,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase): ...@@ -107,7 +107,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
""" """
self.client.login(username=self.staff_usr, password=self.staff_pwd) self.client.login(username=self.staff_usr, password=self.staff_pwd)
resp = self.client.get(self.url_locked) resp = self.client.get(self.url_locked)
self.assertEqual(resp.status_code, 200) # pylint: disable=E1103 self.assertEqual(resp.status_code, 200)
def test_range_request_full_file(self): def test_range_request_full_file(self):
""" """
......
...@@ -75,7 +75,7 @@ class TestTransferStudents(ModuleStoreTestCase): ...@@ -75,7 +75,7 @@ class TestTransferStudents(ModuleStoreTestCase):
self.assertTrue(self.signal_fired) self.assertTrue(self.signal_fired)
# Confirm the analytics event was emitted. # Confirm the analytics event was emitted.
self.mock_tracker.emit.assert_has_calls( # pylint: disable=E1103 self.mock_tracker.emit.assert_has_calls( # pylint: disable=maybe-no-member
[ [
call( call(
EVENT_NAME_ENROLLMENT_ACTIVATED, EVENT_NAME_ENROLLMENT_ACTIVATED,
......
...@@ -163,8 +163,8 @@ class AutoAuthEnabledTestCase(UrlResetMixin, TestCase): ...@@ -163,8 +163,8 @@ class AutoAuthEnabledTestCase(UrlResetMixin, TestCase):
# Check that session and CSRF are set in the response # Check that session and CSRF are set in the response
for cookie in ['csrftoken', 'sessionid']: for cookie in ['csrftoken', 'sessionid']:
self.assertIn(cookie, response.cookies) # pylint: disable=E1103 self.assertIn(cookie, response.cookies) # pylint: disable=maybe-no-member
self.assertTrue(response.cookies[cookie].value) # pylint: disable=E1103 self.assertTrue(response.cookies[cookie].value) # pylint: disable=maybe-no-member
class AutoAuthDisabledTestCase(UrlResetMixin, TestCase): class AutoAuthDisabledTestCase(UrlResetMixin, TestCase):
......
...@@ -106,7 +106,7 @@ class RefundTests(ModuleStoreTestCase): ...@@ -106,7 +106,7 @@ class RefundTests(ModuleStoreTestCase):
pars['confirmed'] = 'true' pars['confirmed'] = 'true'
response = self.client.post('/support/refund/', pars) response = self.client.post('/support/refund/', pars)
self.assertTrue(response.status_code, 302) self.assertTrue(response.status_code, 302)
response = self.client.get(response.get('location')) # pylint: disable=E1103 response = self.client.get(response.get('location')) # pylint: disable=maybe-no-member
self.assertContains(response, "Unenrolled %s from" % self.student) self.assertContains(response, "Unenrolled %s from" % self.student)
self.assertContains(response, "Refunded 1 for order id") self.assertContains(response, "Refunded 1 for order id")
......
...@@ -1229,7 +1229,7 @@ def spent_registration_codes(request, course_id): # pylint: disable=W0613 ...@@ -1229,7 +1229,7 @@ def spent_registration_codes(request, course_id): # pylint: disable=W0613
company_name = request.POST['spent_company_name'] company_name = request.POST['spent_company_name']
if company_name: if company_name:
spent_codes_list = spent_codes_list.filter(invoice__company_name=company_name) # pylint: disable=E1103 spent_codes_list = spent_codes_list.filter(invoice__company_name=company_name) # pylint: disable=maybe-no-member
csv_type = 'spent' csv_type = 'spent'
return registration_codes_csv("Spent_Registration_Codes.csv", spent_codes_list, csv_type) return registration_codes_csv("Spent_Registration_Codes.csv", spent_codes_list, csv_type)
......
...@@ -25,7 +25,7 @@ class TestVideoOutline(ModuleStoreTestCase, APITestCase): ...@@ -25,7 +25,7 @@ class TestVideoOutline(ModuleStoreTestCase, APITestCase):
url = reverse('course-about-detail', kwargs={'course_id': unicode(self.course.id)}) url = reverse('course-about-detail', kwargs={'course_id': unicode(self.course.id)})
response = self.client.get(url) response = self.client.get(url)
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)
self.assertTrue('overview' in response.data) # pylint: disable=E1103 self.assertTrue('overview' in response.data) # pylint: disable=maybe-no-member
def test_handouts(self): def test_handouts(self):
url = reverse('course-handouts-list', kwargs={'course_id': unicode(self.course.id)}) url = reverse('course-handouts-list', kwargs={'course_id': unicode(self.course.id)})
...@@ -36,5 +36,5 @@ class TestVideoOutline(ModuleStoreTestCase, APITestCase): ...@@ -36,5 +36,5 @@ class TestVideoOutline(ModuleStoreTestCase, APITestCase):
url = reverse('course-updates-list', kwargs={'course_id': unicode(self.course.id)}) url = reverse('course-updates-list', kwargs={'course_id': unicode(self.course.id)})
response = self.client.get(url) response = self.client.get(url)
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)
self.assertEqual(response.data, []) # pylint: disable=E1103 self.assertEqual(response.data, []) # pylint: disable=maybe-no-member
# TODO: add handouts and updates, somehow # TODO: add handouts and updates, somehow
...@@ -127,7 +127,7 @@ class TestVideoOutline(ModuleStoreTestCase, APITestCase): ...@@ -127,7 +127,7 @@ class TestVideoOutline(ModuleStoreTestCase, APITestCase):
url = reverse('video-summary-list', kwargs={'course_id': unicode(self.course.id)}) url = reverse('video-summary-list', kwargs={'course_id': unicode(self.course.id)})
response = self.client.get(url) response = self.client.get(url)
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)
return response.data # pylint: disable=E1103 return response.data # pylint: disable=maybe-no-member
def _create_video_with_subs(self): def _create_video_with_subs(self):
""" """
......
...@@ -180,7 +180,7 @@ class OrderTest(ModuleStoreTestCase): ...@@ -180,7 +180,7 @@ class OrderTest(ModuleStoreTestCase):
self.assertIn(item.additional_instruction_text, mail.outbox[0].body) self.assertIn(item.additional_instruction_text, mail.outbox[0].body)
# Assert Google Analytics event fired for purchase. # Assert Google Analytics event fired for purchase.
self.mock_tracker.track.assert_called_once_with( # pylint: disable=E1103 self.mock_tracker.track.assert_called_once_with( # pylint: disable=maybe-no-member
1, 1,
'Completed Order', 'Completed Order',
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment