'When trying to invoke a method not in the allowed method list, we get
a response saying it is not allowed.'

def test_notAllowedMethod(self):

    req = self._getReq()
    req.requestReceived('POST', '/newrender', 'HTTP/1.0')
    self.assertEqual(req.code, 405)
    self.assertTrue(req.responseHeaders.hasHeader('allow'))
    raw_header = req.responseHeaders.getRawHeaders('allow')[0]
    allowed = sorted([h.strip() for h in raw_header.split(',')])
    self.assertEqual(['GET', 'HEAD', 'HEH'], allowed)
