Commit b63aae22 by Jay Zoldak

small pep8 pylint and superclass fixes

parent 5bf839c9
......@@ -32,7 +32,7 @@ class ModuleStoreTestCase(TestCase):
# This query means: every item in the collection
# that is not a template
query = { "_id.course": { "$ne": "templates" }}
query = {"_id.course": {"$ne": "templates"}}
# Remove everything except templates
modulestore.collection.remove(query)
......@@ -47,7 +47,7 @@ class ModuleStoreTestCase(TestCase):
modulestore = xmodule.modulestore.django.modulestore()
# Count the number of templates
query = { "_id.course": "templates"}
query = {"_id.course": "templates"}
num_templates = modulestore.collection.find(query).count()
if num_templates < 1:
......@@ -96,7 +96,7 @@ class ModuleStoreTestCase(TestCase):
ModuleStoreTestCase.load_templates_if_necessary()
# Call superclass implementation
TestCase._pre_setup(self)
super(ModuleStoreTestCase, self)._pre_setup()
def _post_teardown(self):
'''
......@@ -106,7 +106,7 @@ class ModuleStoreTestCase(TestCase):
ModuleStoreTestCase.flush_mongo_except_templates()
# Call superclass implementation
TestCase._post_teardown(self)
super(ModuleStoreTestCase, self)._post_teardown()
def parse_json(response):
......
......@@ -3,7 +3,6 @@ import unittest
import threading
import json
import urllib
import urlparse
import time
from mock_xqueue_server import MockXQueueServer, MockXQueueRequestHandler
......
......@@ -287,7 +287,6 @@ class PageLoaderTestCase(LoginEnrollmentTestCase):
self.enroll(course)
course_id = course.id
# Search for items in the course
# None is treated as a wildcard
course_loc = course.location
......@@ -301,7 +300,6 @@ class PageLoaderTestCase(LoginEnrollmentTestCase):
else:
descriptor = random.choice(items)
# We have ancillary course information now as modules
# and we can't simply use 'jump_to' to view them
if descriptor.location.category == 'about':
......@@ -330,7 +328,6 @@ class PageLoaderTestCase(LoginEnrollmentTestCase):
expect_redirect=True,
check_content=True)
def _assert_loads(self, django_url, kwargs, descriptor,
expect_redirect=False,
check_content=False):
......@@ -390,7 +387,6 @@ class TestCoursesLoadTestCase_MongoModulestore(PageLoaderTestCase):
self.check_random_page_loads(module_store)
@override_settings(MODULESTORE=TEST_DATA_XML_MODULESTORE)
class TestNavigation(LoginEnrollmentTestCase):
"""Check that navigation state is saved properly"""
......@@ -642,7 +638,7 @@ class TestViewAuth(LoginEnrollmentTestCase):
print '=== Checking non-staff access for {0}'.format(course.id)
# Randomly sample a dark url
url = random.choice( instructor_urls(course) +
url = random.choice(instructor_urls(course) +
dark_student_urls(course) +
reverse_urls(['courseware'], course))
print 'checking for 404 on {0}'.format(url)
......
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