def test_noDefaultContentTypeOnZeroLengthResponse(self):
        """
        Responses with no length do not have a default content-type applied.
        """
        resrc = ZeroLengthResource()
        resrc.putChild(b'', resrc)
        site = server.Site(resrc)
        d = DummyChannel()
        d.site = site
        request = server.Request(d, 1)
        request.site = site
        request.setHost(b'example.com', 80)
        request.gotLength(0)
        request.requestReceived(b'GET', b'/', b'HTTP/1.1')

        self.assertNotIn(
            b'content-type', request.transport.written.getvalue().lower()
        )

        Responses with no length do not have a default content-type applied.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_web.py