Files
edx-platform/common/lib/xmodule/xmodule/tests/test_utils_django.py
Feanil Patel 9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00

25 lines
700 B
Python

"""Tests for methods defined in util/django.py"""
from unittest import TestCase
from xmodule.util.xmodule_django import get_current_request, get_current_request_hostname
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 get_current_request() is None
def test_get_current_request_hostname(self):
"""
Since we are running outside of Django assert that get_current_request_hostname returns None
"""
assert get_current_request_hostname() is None