Пример #1
0
 def testNoAuthHeaders(self):
   """
   Negative test for authentication guarded route.
   invoke get request without passing authentication headers
   response is validated for appropriate headers and body
   """
   response = self.app.get("/", status="*")
   assertions.assertInvalidAuthenticationResponse(self, response)
Пример #2
0
 def testInvalidAuthHeaders(self):
   """
   Negative test for authentication guarded route.
   invoke get request with invalid authentication headers
   response is validated for appropriate headers and body
   """
   invalidHeaders = getInvalidHTTPHeaders()
   response = self.app.get("/", status="*", headers=invalidHeaders)
   assertions.assertInvalidAuthenticationResponse(self, response)