def test_acceptHeaders(self):
        """
        L{client.ContentDecoderAgent} sets the I{Accept-Encoding} header to the
        names of the available decoder objects.
        """
        agent = client.ContentDecoderAgent(
            self.agent, [(b'decoder1', Decoder1), (b'decoder2', Decoder2)])

        agent.request(b'GET', b'http://example.com/foo')

        protocol = self.protocol

        self.assertEqual(len(protocol.requests), 1)
        req, res = protocol.requests.pop()
        self.assertEqual(req.headers.getRawHeaders(b'accept-encoding'),
                         [b'decoder1,decoder2'])

        L{client.ContentDecoderAgent} sets the I{Accept-Encoding} header to the
        names of the available decoder objects.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_agent.py