Пример #1
0
 def testInvalidMethod(self):
     """
 Invoe non supported methods
 resoponse is validated for appropriate headers and body
 """
     response = self.app.post("", status="*", headers=self.headers)
     assertions.assertMethodNotAllowed(self, response)
     headers = dict(response.headers)
     self.assertEqual(headers["Allow"], "GET")
Пример #2
0
 def testInvalidMethod(self):
     """
 Invoke non supported method
 resoponse is validated for appropriate headers and body
 """
     response = self.app.put("", status="*", headers=self.headers)
     assertions.assertMethodNotAllowed(self, response)
     headers = dict(response.headers)
     self.assertEqual(headers["Allow"], "GET, POST")