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

        L{Data.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