fix pylint violations

This commit is contained in:
Adam Palay
2013-07-02 10:22:26 -04:00
parent bf25283d54
commit c692428fe5
3 changed files with 7 additions and 5 deletions

View File

@@ -1,3 +1,4 @@
"""Tests for CMS's requests to logs"""
from django.test import TestCase
from django.core.urlresolvers import reverse
from contentstore.views.requests import event as cms_user_track

View File

@@ -1,3 +1,4 @@
"""Tests for student tracking"""
from django.test import TestCase
from django.core.urlresolvers import reverse, NoReverseMatch
from track.models import TrackingLog

View File

@@ -61,9 +61,9 @@ def make_track_function(request):
'''
import track.views
def f(event_type, event):
def function(event_type, event):
return track.views.server_track(request, event_type, event, page='x_module')
return f
return function
def toc_for_course(user, request, course, active_chapter, active_section, model_data_cache):
@@ -171,9 +171,9 @@ def get_xqueue_callback_url_prefix(request):
should go back to the LMS, not to the worker.
"""
prefix = '{proto}://{host}'.format(
proto=request.META.get('HTTP_X_FORWARDED_PROTO', 'https' if request.is_secure() else 'http'),
host=request.get_host()
)
proto=request.META.get('HTTP_X_FORWARDED_PROTO', 'https' if request.is_secure() else 'http'),
host=request.get_host()
)
return settings.XQUEUE_INTERFACE.get('callback_url', prefix)