Use system.getHostname() everywhere
Replace os.environ['HTTP_HOST'] with system.getHostname(), as a
result we do not crash when 'HTTP_HOST' is unset now.
"""Django Unit Test and Doctest framework."""from django.test.client import Clientfrom django.test.testcases import TestCase