From 2f67d0aab4282cb1c0f6a9f3740a8e4699d3e5a1 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Mon, 10 Feb 2014 15:13:11 -0500 Subject: [PATCH] Remove tabs. --- .../xmodule/tests/test_utils_django.py | 26 +++++++++---------- common/lib/xmodule/xmodule/util/django.py | 18 ++++++------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/common/lib/xmodule/xmodule/tests/test_utils_django.py b/common/lib/xmodule/xmodule/tests/test_utils_django.py index 1d5bf9d83e..36a3b0c272 100644 --- a/common/lib/xmodule/xmodule/tests/test_utils_django.py +++ b/common/lib/xmodule/xmodule/tests/test_utils_django.py @@ -4,17 +4,17 @@ from nose.tools import assert_is_none from unittest import TestCase class UtilDjangoTests(TestCase): - """ - Tests for methods exposed in util/django - """ - def test_get_current_request(self): - """ - Since we are running outside of Django assert that get_current_request returns None - """ - assert_is_none(get_current_request()) + """ + Tests for methods exposed in util/django + """ + def test_get_current_request(self): + """ + Since we are running outside of Django assert that get_current_request returns None + """ + assert_is_none(get_current_request()) - def test_get_current_request_hostname(self): - """ - Since we are running outside of Django assert that get_current_request_hostname returns None - """ - assert_is_none(get_current_request_hostname()) + def test_get_current_request_hostname(self): + """ + Since we are running outside of Django assert that get_current_request_hostname returns None + """ + assert_is_none(get_current_request_hostname()) diff --git a/common/lib/xmodule/xmodule/util/django.py b/common/lib/xmodule/xmodule/util/django.py index 20a7c3fa79..0e40c497da 100644 --- a/common/lib/xmodule/xmodule/util/django.py +++ b/common/lib/xmodule/xmodule/util/django.py @@ -1,6 +1,6 @@ """ Exposes Django utilities for consumption in the xmodule library -NOTE: This file should only be imported into 'django-safe' code, i.e. known that this code runs int the Django +NOTE: This file should only be imported into 'django-safe' code, i.e. known that this code runs int the Django runtime environment with the djangoapps in common configured to load """ @@ -9,12 +9,12 @@ from crum import get_current_request def get_current_request_hostname(): - """ - This method will return the hostname that was used in the current Django request - """ - hostname = None - request = get_current_request() - if request: - hostname = request.META.get('HTTP_HOST') + """ + This method will return the hostname that was used in the current Django request + """ + hostname = None + request = get_current_request() + if request: + hostname = request.META.get('HTTP_HOST') - return hostname + return hostname