def test_redirectToUnicodeURL(self) :
        """
        L{redirectTo} will raise TypeError if unicode object is passed in URL
        """
        request = Request(DummyChannel(), True)
        request.method = b'GET'
        targetURL = u'http://target.example.com/4321'
        self.assertRaises(TypeError, redirectTo, targetURL, request)

        L{redirectTo} will raise TypeError if unicode object is passed in URL
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_util.py