Remove needless 'disable=no-member' pragmas

This commit is contained in:
Ned Batchelder
2015-08-03 16:59:57 -04:00
parent ee0f4b2594
commit f54fe787c6
73 changed files with 144 additions and 186 deletions

View File

@@ -361,7 +361,7 @@ class TestMasqueradedGroup(StaffMasqueradeTestCase):
# Now setup the masquerade for the test user
setup_masquerade(request, self.test_user, True)
scheme = self.user_partition.scheme # pylint: disable=no-member
scheme = self.user_partition.scheme
self.assertEqual(
scheme.get_group_for_user(self.course.id, self.test_user, self.user_partition),
group

View File

@@ -609,7 +609,6 @@ class TestAccountAPI(UserAPITestCase):
"""
self.client.login(username=self.user.username, password=self.test_password)
response = self.send_get(self.client)
# pylint: disable=no-member
self.assertEqual(
response.data["profile_image"],
{

View File

@@ -324,7 +324,7 @@ class UpdateEmailOptInTests(ModuleStoreTestCase):
# Set year of birth
user = User.objects.get(username=self.USERNAME)
profile = UserProfile.objects.get(user=user)
year_of_birth = datetime.datetime.now().year - age # pylint: disable=maybe-no-member
year_of_birth = datetime.datetime.now().year - age
profile.year_of_birth = year_of_birth
profile.save()
@@ -374,7 +374,7 @@ class UpdateEmailOptInTests(ModuleStoreTestCase):
# Set year of birth
user = User.objects.get(username=self.USERNAME)
profile = UserProfile.objects.get(user=user)
year_of_birth = datetime.datetime.now(UTC).year - age # pylint: disable=maybe-no-member
year_of_birth = datetime.datetime.now(UTC).year - age
profile.year_of_birth = year_of_birth
profile.save()

View File

@@ -1016,7 +1016,7 @@ class RegistrationViewTest(ThirdPartyAuthTestMixin, ApiTestCase):
)
def test_register_form_year_of_birth(self):
this_year = datetime.datetime.now(UTC).year # pylint: disable=maybe-no-member
this_year = datetime.datetime.now(UTC).year
year_options = (
[{"value": "", "name": "--", "default": True}] + [
{"value": unicode(year), "name": unicode(year)}

View File

@@ -168,13 +168,13 @@ class TestConditionalContent(ModuleStoreTestCase):
UserCourseTagFactory(
user=self.student_a,
course_id=self.course.id,
key='xblock.partition_service.partition_{0}'.format(self.partition.id), # pylint: disable=no-member
key='xblock.partition_service.partition_{0}'.format(self.partition.id),
value=str(self.user_partition_group_a)
)
UserCourseTagFactory(
user=self.student_b,
course_id=self.course.id,
key='xblock.partition_service.partition_{0}'.format(self.partition.id), # pylint: disable=no-member
key='xblock.partition_service.partition_{0}'.format(self.partition.id),
value=str(self.user_partition_group_b)
)
@@ -192,7 +192,7 @@ class TestConditionalContent(ModuleStoreTestCase):
parent_location=problem_vertical.location,
category='split_test',
display_name='Split Test',
user_partition_id=self.partition.id, # pylint: disable=no-member
user_partition_id=self.partition.id,
group_id_to_child={str(index): url for index, url in enumerate([vertical_a_url, vertical_b_url])}
)
self.vertical_a = ItemFactory.create(