Commit c5a7911b by Jay Zoldak

Fix pylint disable pragmas that were pep8 violations

parent 021e6f5b
#pylint: disable=C0111
#pylint: disable=W0621
# pylint: disable=C0111
# pylint: disable=W0621
from lettuce import world, step
from nose.tools import assert_false, assert_equal, assert_regexp_matches # pylint: disable=E0611
......
#pylint: disable=C0111
#pylint: disable=W0621
# pylint: disable=C0111
# pylint: disable=W0621
from lettuce import world, step
from nose.tools import assert_true, assert_equal # pylint: disable=E0611
......
#pylint: disable=C0111
#pylint: disable=W0621
# pylint: disable=C0111
# pylint: disable=W0621
# Lettuce formats proposed definitions for unimplemented steps with the
# argument name "step" instead of "_step" and pylint does not like that.
#pylint: disable=W0613
# pylint: disable=W0613
from lettuce import world, step
from nose.tools import assert_true, assert_in # pylint: disable=E0611
......
# disable missing docstring
#pylint: disable=C0111
# pylint: disable=C0111
from lettuce import world
from nose.tools import assert_equal, assert_in # pylint: disable=E0611
......
# disable missing docstring
#pylint: disable=C0111
# pylint: disable=C0111
from lettuce import world, step
from component_settings_editor_helpers import enter_xml_in_advanced_problem
......
#pylint: disable=C0111
#pylint: disable=W0621
# pylint: disable=C0111
# pylint: disable=W0621
from lettuce import world, step
from terrain.steps import reload_the_page
......
#pylint: disable=C0111
#pylint: disable=W0621
# pylint: disable=C0111
# pylint: disable=W0621
from lettuce import world, step
from nose.tools import assert_in # pylint: disable=E0611
......
#pylint: disable=C0111
#pylint: disable=W0621
# pylint: disable=C0111
# pylint: disable=W0621
from lettuce import world, step
from selenium.webdriver.common.keys import Keys
......
#pylint: disable=C0111
#pylint: disable=W0621
# pylint: disable=C0111
# pylint: disable=W0621
from lettuce import world, step
from common import *
......
# disable missing docstring
#pylint: disable=C0111
# pylint: disable=C0111
from lettuce import world, step
......
#pylint: disable=C0111
#pylint: disable=W0621
# pylint: disable=C0111
# pylint: disable=W0621
from lettuce import world, step
from common import *
......
# disable missing docstring
#pylint: disable=C0111
# pylint: disable=C0111
from lettuce import world, step
from nose.tools import assert_in # pylint: disable=no-name-in-module
......
# disable missing docstring
#pylint: disable=C0111
# pylint: disable=C0111
import json
from lettuce import world, step
......
#pylint: disable=C0111
#pylint: disable=W0621
# pylint: disable=C0111
# pylint: disable=W0621
from lettuce import world, step
......
#pylint: disable=C0111
#pylint: disable=W0621
# pylint: disable=C0111
# pylint: disable=W0621
from lettuce import world, step
from nose.tools import assert_equal # pylint: disable=E0611
......
#pylint: disable=C0111
#pylint: disable=W0621
# pylint: disable=C0111
# pylint: disable=W0621
from lettuce import world, step
from common import *
......
#pylint: disable=C0111
#pylint: disable=W0621
# pylint: disable=C0111
# pylint: disable=W0621
from lettuce import world, step
from django.conf import settings
......
#pylint: disable=C0111
#pylint: disable=W0621
# pylint: disable=C0111
# pylint: disable=W0621
from lettuce import world, step
from lettuce.django import django_url
......
#pylint: disable=C0111
# pylint: disable=C0111
from lettuce import world, step
from xmodule.modulestore import Location
......
# -*- coding: utf-8 -*-
#pylint: disable=E1101
# pylint: disable=E1101
import json
import mock
......
#pylint: disable=E1101
# pylint: disable=E1101
"""
Tests for import_from_xml using the mongo modulestore.
"""
......
#pylint: disable=E1103, E1101
# pylint: disable=E1103, E1101
import copy
import logging
......
#pylint: disable=C0111,W0613
# pylint: disable=C0111,W0613
from django.http import (HttpResponse, HttpResponseServerError,
HttpResponseNotFound)
......
......@@ -2,9 +2,9 @@
Unit tests for the asset upload endpoint.
"""
#pylint: disable=C0111
#pylint: disable=W0621
#pylint: disable=W0212
# pylint: disable=C0111
# pylint: disable=W0621
# pylint: disable=W0212
from datetime import datetime
from io import BytesIO
......
......@@ -13,7 +13,7 @@ from path import path
# This is a convenience for ensuring (a) that we can consistently find the files
# and (b) that the files are the same in Jenkins as in local dev.
os.environ['SERVICE_VARIANT'] = 'bok_choy'
os.environ['CONFIG_ROOT'] = path(__file__).abspath().dirname() #pylint: disable=E1120
os.environ['CONFIG_ROOT'] = path(__file__).abspath().dirname() # pylint: disable=E1120
from .aws import * # pylint: disable=W0401, W0614
......@@ -23,13 +23,13 @@ from .aws import * # pylint: disable=W0401, W0614
INSTALLED_APPS += ('django_extensions',)
# Redirect to the test_root folder within the repo
TEST_ROOT = CONFIG_ROOT.dirname().dirname() / "test_root" #pylint: disable=E1120
TEST_ROOT = CONFIG_ROOT.dirname().dirname() / "test_root" # pylint: disable=E1120
GITHUB_REPO_ROOT = (TEST_ROOT / "data").abspath()
LOG_DIR = (TEST_ROOT / "log").abspath()
# Configure Mongo modulestore to use the test folder within the repo
for store in ["default", "direct"]:
MODULESTORE[store]['OPTIONS']['fs_root'] = (TEST_ROOT / "data").abspath() #pylint: disable=E1120
MODULESTORE[store]['OPTIONS']['fs_root'] = (TEST_ROOT / "data").abspath() # pylint: disable=E1120
# Enable django-pipeline and staticfiles
STATIC_ROOT = (TEST_ROOT / "staticfiles").abspath()
......
#pylint: disable=W0614, W0401
# pylint: disable=W0614, W0401
from .dev import *
FILE_UPLOAD_HANDLERS = (
......
......@@ -137,6 +137,6 @@ if settings.DEBUG:
pass
# Custom error pages
#pylint: disable=C0103
# pylint: disable=C0103
handler404 = 'contentstore.views.render_404'
handler500 = 'contentstore.views.render_500'
......@@ -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
......
#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
......
#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
......
# -*- coding: utf-8 -*-
#pylint: disable=W0212
# pylint: disable=W0212
"""Test for Video Xmodule functional logic.
These test data read from xml, not from mongo.
......
# 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()
......
# -*- coding: utf-8 -*-
#pylint: disable=C0103
#pylint: disable=W0622
#pylint: disable=W0212
#pylint: disable=W0613
# pylint: disable=C0103
# pylint: disable=W0622
# pylint: disable=W0212
# pylint: disable=W0613
import sys, os
from path import path
......
#pylint: disable=C0111
#pylint: disable=W0621
# pylint: disable=C0111
# pylint: disable=W0621
from lettuce import world, step
from lettuce.django import django_url
......
#pylint: disable=C0111
#pylint: disable=W0621
# pylint: disable=C0111
# pylint: disable=W0621
from lettuce import world, step
from lettuce.django import django_url
......
#pylint: disable=C0111
#pylint: disable=W0621
# pylint: disable=C0111
# pylint: disable=W0621
from lettuce import world, step
......
#pylint: disable=C0111
# pylint: disable=C0111
from lettuce import step
from lettuce import world
......
#pylint: disable=C0111
#pylint: disable=W0621
# pylint: disable=C0111
# pylint: disable=W0621
from lettuce import world, step
......
#pylint: disable=C0111
#pylint: disable=W0621
# pylint: disable=C0111
# pylint: disable=W0621
from lettuce import world, step
from nose.tools import assert_in, assert_equals # pylint: disable=E0611
......
#pylint: disable=C0111
#pylint: disable=W0621
# pylint: disable=C0111
# pylint: disable=W0621
from lettuce import step, world
from django.contrib.auth.models import User
......
#pylint: disable=C0111
# pylint: disable=C0111
import datetime
import os
import pytz
......
#pylint: disable=C0111
#pylint: disable=W0621
# pylint: disable=C0111
# pylint: disable=W0621
from lettuce import world, step
from common import course_id, course_location
......
#pylint: disable=C0111
#pylint: disable=W0621
# pylint: disable=C0111
# pylint: disable=W0621
from lettuce import world, step
from lettuce.django import django_url
......
#pylint: disable=C0111
#pylint: disable=W0621
# pylint: disable=C0111
# pylint: disable=W0621
#EVERY PROBLEM TYPE MUST HAVE THE FOLLOWING:
# -Section in Dictionary containing:
......
#pylint: disable=C0111
#pylint: disable=W0621
# pylint: disable=C0111
# pylint: disable=W0621
from lettuce import world, step
......
# -*- coding: utf-8 -*-
#pylint: disable=C0111
# pylint: disable=C0111
from lettuce import world, step
import os
......
#pylint: disable=C0111
# pylint: disable=C0111
from time import sleep
......
......@@ -111,7 +111,7 @@ class CoursewareContextTestCase(ModuleStoreTestCase):
]
utils.add_courseware_context(threads, self.course)
def assertThreadCorrect(thread, discussion, expected_title): #pylint: disable=C0103
def assertThreadCorrect(thread, discussion, expected_title): # pylint: disable=C0103
self.assertEqual(
set(thread.keys()),
set(["commentable_id", "courseware_url", "courseware_title"])
......@@ -146,7 +146,7 @@ class CategoryMapTestCase(ModuleStoreTestCase):
self.course.discussion_topics = {}
self.course.save()
self.discussion_num = 0
self.maxDiff = None #pylint: disable=C0103
self.maxDiff = None # pylint: disable=C0103
def create_discussion(self, discussion_category, discussion_target, **kwargs):
self.discussion_num += 1
......
......@@ -2,8 +2,8 @@
Define steps for bulk email acceptance test.
"""
#pylint: disable=C0111
#pylint: disable=W0621
# pylint: disable=C0111
# pylint: disable=W0621
from lettuce import world, step
from lettuce.django import mail
......
......@@ -38,7 +38,7 @@ class TestHandleDashboardError(unittest.TestCase):
Test handle_dashboard_error decorator.
"""
def test_error(self):
#pylint: disable=W0613
# pylint: disable=W0613
@tools.handle_dashboard_error
def view(request, course_id):
"""
......@@ -50,7 +50,7 @@ class TestHandleDashboardError(unittest.TestCase):
self.assertEqual(response, {'error': 'Oh noes!'})
def test_no_error(self):
#pylint: disable=W0613
# pylint: disable=W0613
@tools.handle_dashboard_error
def view(request, course_id):
"""
......
......@@ -5,7 +5,7 @@ Settings for bok choy tests
import os
from path import path
CONFIG_ROOT = path(__file__).abspath().dirname() #pylint: disable=E1120
CONFIG_ROOT = path(__file__).abspath().dirname() # pylint: disable=E1120
TEST_ROOT = CONFIG_ROOT.dirname().dirname() / "test_root"
########################## Prod-like settings ###################################
......
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