def test_relativeURIPreserveFragments(self):
        """
        L{client.RedirectAgent} resolves and follows relative I{URI}s in
        redirects, preserving fragments in way that complies with the HTTP 1.1
        bis draft.

        @see: U{https://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-22#section-7.1.2}
        """
        self._testRedirectURI(
            b'http://example.com/foo/bar#frag', b'/baz?a',
            b'http://example.com/baz?a#frag')
        self._testRedirectURI(
            b'http://example.com/foo/bar', b'/baz?a#frag2',
            b'http://example.com/baz?a#frag2')

        L{client.RedirectAgent} resolves and follows relative I{URI}s in
        redirects, preserving fragments in way that complies with the HTTP 1.1
        bis draft.

        @see: U{https://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-22#section-7.1.2}
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_agent.py