Merge pull request #2997 from edx/zoldak/fix-pragma-pep8
Fix pylint disable pragmas that were pep8 violations
This commit is contained in:
@@ -89,7 +89,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
|
||||
"""
|
||||
self.client.logout()
|
||||
resp = self.client.get(self.url_unlocked)
|
||||
self.assertEqual(resp.status_code, 200) #pylint: disable=E1103
|
||||
self.assertEqual(resp.status_code, 200) # pylint: disable=E1103
|
||||
|
||||
def test_locked_asset_not_logged_in(self):
|
||||
"""
|
||||
@@ -98,7 +98,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
|
||||
"""
|
||||
self.client.logout()
|
||||
resp = self.client.get(self.url_locked)
|
||||
self.assertEqual(resp.status_code, 403) #pylint: disable=E1103
|
||||
self.assertEqual(resp.status_code, 403) # pylint: disable=E1103
|
||||
|
||||
def test_locked_asset_not_registered(self):
|
||||
"""
|
||||
@@ -107,30 +107,30 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
|
||||
"""
|
||||
self.client.login(username=self.usr, password=self.pwd)
|
||||
resp = self.client.get(self.url_locked)
|
||||
self.assertEqual(resp.status_code, 403) #pylint: disable=E1103
|
||||
self.assertEqual(resp.status_code, 403) # pylint: disable=E1103
|
||||
|
||||
def test_locked_asset_registered(self):
|
||||
"""
|
||||
Test that locked assets behave appropriately in case user is logged in
|
||||
and registered for the course.
|
||||
"""
|
||||
#pylint: disable=E1101
|
||||
# pylint: disable=E1101
|
||||
course_id = "/".join([self.loc_locked.org, self.loc_locked.course, '2012_Fall'])
|
||||
CourseEnrollment.enroll(self.user, course_id)
|
||||
self.assertTrue(CourseEnrollment.is_enrolled(self.user, course_id))
|
||||
|
||||
self.client.login(username=self.usr, password=self.pwd)
|
||||
resp = self.client.get(self.url_locked)
|
||||
self.assertEqual(resp.status_code, 200) #pylint: disable=E1103
|
||||
self.assertEqual(resp.status_code, 200) # pylint: disable=E1103
|
||||
|
||||
def test_locked_asset_staff(self):
|
||||
"""
|
||||
Test that locked assets behave appropriately in case user is staff.
|
||||
"""
|
||||
#pylint: disable=E1101
|
||||
# pylint: disable=E1101
|
||||
course_id = "/".join([self.loc_locked.org, self.loc_locked.course, '2012_Fall'])
|
||||
|
||||
self.client.login(username=self.staff_usr, password=self.staff_pwd)
|
||||
resp = self.client.get(self.url_locked)
|
||||
self.assertEqual(resp.status_code, 200) #pylint: disable=E1103
|
||||
self.assertEqual(resp.status_code, 200) # pylint: disable=E1103
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
Browser set up for acceptance tests.
|
||||
"""
|
||||
|
||||
#pylint: disable=E1101
|
||||
#pylint: disable=W0613
|
||||
# pylint: disable=E1101
|
||||
# pylint: disable=W0613
|
||||
|
||||
from lettuce import before, after, world
|
||||
from splinter.browser import Browser
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
#pylint: disable=C0111
|
||||
#pylint: disable=W0621
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=W0621
|
||||
|
||||
# Disable the "wildcard import" warning so we can bring in all methods from
|
||||
# course helpers and ui helpers
|
||||
#pylint: disable=W0401
|
||||
# pylint: disable=W0401
|
||||
|
||||
# Disable the "Unused import %s from wildcard import" warning
|
||||
#pylint: disable=W0614
|
||||
# pylint: disable=W0614
|
||||
|
||||
# Disable the "unused argument" warning because lettuce uses "step"
|
||||
#pylint: disable=W0613
|
||||
# pylint: disable=W0613
|
||||
|
||||
# django_url is assigned late in the process of loading lettuce,
|
||||
# so we import this as a module, and then read django_url from
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pylint: disable=C0111
|
||||
#pylint: disable=W0621
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=W0621
|
||||
|
||||
from lettuce import world
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ from os.path import abspath, realpath, dirname, join as joinpath
|
||||
from django.core.exceptions import SuspiciousOperation
|
||||
import logging
|
||||
|
||||
log = logging.getLogger(__name__) #pylint: disable=C0103
|
||||
log = logging.getLogger(__name__) # pylint: disable=C0103
|
||||
|
||||
def resolved(rpath):
|
||||
"""
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
"""
|
||||
Tests of the Capa XModule
|
||||
"""
|
||||
#pylint: disable=C0111
|
||||
#pylint: disable=R0904
|
||||
#pylint: disable=C0103
|
||||
#pylint: disable=C0302
|
||||
# pylint: disable=C0111
|
||||
# pylint: disable=R0904
|
||||
# pylint: disable=C0103
|
||||
# pylint: disable=C0302
|
||||
|
||||
import datetime
|
||||
import json
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#pylint: disable=W0212
|
||||
# pylint: disable=W0212
|
||||
"""Test for Video Xmodule functional logic.
|
||||
These test data read from xml, not from mongo.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# disable missing docstring
|
||||
#pylint: disable=C0111
|
||||
# pylint: disable=C0111
|
||||
|
||||
import unittest
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ def load_data_str(rel_path):
|
||||
Load a file from the "data" directory as a string.
|
||||
`rel_path` is the path relative to the data directory.
|
||||
"""
|
||||
full_path = path(__file__).abspath().dirname() / "data" / rel_path #pylint: disable=E1120
|
||||
full_path = path(__file__).abspath().dirname() / "data" / rel_path # pylint: disable=E1120
|
||||
with open(full_path) as data_file:
|
||||
return data_file.read()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user