'If an endpoint is restricted to being used with certain HTTP methods
then a request for that endpoint using a different method receives a
I{NOT ALLOWED} response.'

def test_notAllowed(self):

    app = self.Application()
    request = dummyRequest('POST', '/foo/bar', Headers(), dumps({}))
    render(app.app.resource(), request)
    self.assertEqual(NOT_ALLOWED, request._code)
