def get_host_for_subdomain(self, subdomain=None):
        """
        Returns the hostname for the provided subdomain.
        """
        if subdomain is not None:
            host = '%s.%s' % (subdomain, self.site.domain)
        else:
            host = '%s' % self.site.domain
        return host
dataset/ETHPy150Open tkaemming/django-subdomains/subdomains/tests/tests.py/SubdomainTestMixin.get_host_for_subdomain/original