def test_setURLRemovesFragment(self):
        """
        L{client.HTTPClientFactory.setURL} removes the fragment identifier from
        the path component.
        """
        f = client.HTTPClientFactory(b'http://example.com')
        url = b'https://foo.com:8443/bar;123?a#frag'
        f.setURL(url)
        self.assertEqual(
            (url, b'https', b'foo.com', 8443, b'/bar;123?a'),
            (f.url, f.scheme, f.host, f.port, f.path))

        L{client.HTTPClientFactory.setURL} removes the fragment identifier from
        the path component.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_webclient.py