def test_invalidMethod(self):
        """
        L{File.render} raises L{UnsupportedMethod} in response to a non-I{GET},
        non-I{HEAD} request.
        """
        request = DummyRequest([b''])
        request.method = b'POST'
        path = FilePath(self.mktemp())
        path.setContent(b"foo")
        file = static.File(path.path)
        self.assertRaises(UnsupportedMethod, file.render, request)

        L{File.render} raises L{UnsupportedMethod} in response to a non-I{GET},
        non-I{HEAD} request.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_static.py