Commit 2f67d0aa by Ned Batchelder

Remove tabs.

parent 678749fb
...@@ -4,17 +4,17 @@ from nose.tools import assert_is_none ...@@ -4,17 +4,17 @@ from nose.tools import assert_is_none
from unittest import TestCase from unittest import TestCase
class UtilDjangoTests(TestCase): class UtilDjangoTests(TestCase):
""" """
Tests for methods exposed in util/django Tests for methods exposed in util/django
""" """
def test_get_current_request(self): def test_get_current_request(self):
""" """
Since we are running outside of Django assert that get_current_request returns None Since we are running outside of Django assert that get_current_request returns None
""" """
assert_is_none(get_current_request()) assert_is_none(get_current_request())
def test_get_current_request_hostname(self): def test_get_current_request_hostname(self):
""" """
Since we are running outside of Django assert that get_current_request_hostname returns None Since we are running outside of Django assert that get_current_request_hostname returns None
""" """
assert_is_none(get_current_request_hostname()) assert_is_none(get_current_request_hostname())
""" """
Exposes Django utilities for consumption in the xmodule library 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 runtime environment with the djangoapps in common configured to load
""" """
...@@ -9,12 +9,12 @@ from crum import get_current_request ...@@ -9,12 +9,12 @@ from crum import get_current_request
def get_current_request_hostname(): def get_current_request_hostname():
""" """
This method will return the hostname that was used in the current Django request This method will return the hostname that was used in the current Django request
""" """
hostname = None hostname = None
request = get_current_request() request = get_current_request()
if request: if request:
hostname = request.META.get('HTTP_HOST') hostname = request.META.get('HTTP_HOST')
return hostname return hostname
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