def test_invalidMethod(self):
        """
        L{UserDirectory.render} raises L{UnsupportedMethod} in response to a
        non-I{GET} request.
        """
        request = DummyRequest([''])
        request.method = 'POST'
        self.assertRaises(
            server.UnsupportedMethod, self.directory.render, request)

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