def test_case_insensitive_subdomain(self):
        host = self.DOMAIN % 'WWW.%s'
        request = RequestFactory().get('/', HTTP_HOST=host)
        self.middleware.process_request(request)
        self.assertEqual(request.subdomain, 'www')

        host = 'www.%s' % self.DOMAIN.upper()
        request = RequestFactory().get('/', HTTP_HOST=host)
        self.middleware.process_request(request)
        self.assertEqual(request.subdomain, 'www')
dataset/ETHPy150Open tkaemming/django-subdomains/subdomains/tests/tests.py/SubdomainMiddlewareTestCase.test_case_insensitive_subdomain/swapped operands of `%`