def testDefaultFilterAlternateError(self): application = filters.static_page(content='it went awry', status=(500, 'oh no!')) self.StartWebServer(filters.filter_request(lambda environ: True, app=application)) self.CheckError('/', content='it went arwy', expected_code=500, expected_content='it went arwy')
def testDefaultFilterFalse(self): self.StartWebServer(filters.filter_request(lambda environ: False)) self.CheckError('/')
def testDefaultFilterAlternateApplication(self): application = filters.static_page(content='it was ok') self.StartWebServer(filters.filter_request(lambda environ: True, app=application)) response = self.SendRequest('/') self.CheckResponse(response, expected_content='it was ok')
def testDefaultFilterTrue(self): self.StartWebServer(filters.filter_request(lambda environ: True)) self.CheckResponse(self.SendRequest('/'))