Commit c692428f by Adam Palay

fix pylint violations

parent bf25283d
"""Tests for CMS's requests to logs"""
from django.test import TestCase from django.test import TestCase
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from contentstore.views.requests import event as cms_user_track from contentstore.views.requests import event as cms_user_track
......
"""Tests for student tracking"""
from django.test import TestCase from django.test import TestCase
from django.core.urlresolvers import reverse, NoReverseMatch from django.core.urlresolvers import reverse, NoReverseMatch
from track.models import TrackingLog from track.models import TrackingLog
......
...@@ -61,9 +61,9 @@ def make_track_function(request): ...@@ -61,9 +61,9 @@ def make_track_function(request):
''' '''
import track.views 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 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): 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): ...@@ -171,9 +171,9 @@ def get_xqueue_callback_url_prefix(request):
should go back to the LMS, not to the worker. should go back to the LMS, not to the worker.
""" """
prefix = '{proto}://{host}'.format( prefix = '{proto}://{host}'.format(
proto=request.META.get('HTTP_X_FORWARDED_PROTO', 'https' if request.is_secure() else 'http'), proto=request.META.get('HTTP_X_FORWARDED_PROTO', 'https' if request.is_secure() else 'http'),
host=request.get_host() host=request.get_host()
) )
return settings.XQUEUE_INTERFACE.get('callback_url', prefix) return settings.XQUEUE_INTERFACE.get('callback_url', prefix)
......
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