def test_headRequest(self):
        """
        L{static.File.render} returns an empty response body for I{HEAD}
        requests.
        """
        path = FilePath(self.mktemp())
        path.setContent(b"foo")
        file = static.File(path.path)
        request = DummyRequest([b''])
        request.method = b'HEAD'
        d = _render(file, request)
        def cbRendered(ignored):
            self.assertEqual(b"".join(request.written), b"")
        d.addCallback(cbRendered)
        return d

        L{static.File.render} returns an empty response body for I{HEAD}
        requests.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_static.py