Пример #1
0
 def _make_url_not_found_error_response(self):
     """ Construct a Not Found error response """
     header = ResponseHeader(http_codes["Not Found"])
     page = pagetemplate.url_not_found_page(self.path)
     data = self._get_page_data(page)
     response = Response(header, data)
     return response
Пример #2
0
 def test_url_not_found_page_contains_url(self):
     """ Resulting page should contain the referent URL """
     url = "/flim/flam/flom"
     page = pagetemplate.url_not_found_page(url)
     expect_data = "...%(url)s..." % vars()
     page_data = page.serialise()
     self.failUnlessOutputCheckerMatch(expect_data, page_data)
Пример #3
0
 def test_url_not_found_page_contains_url(self):
     """ Resulting page should contain the referent URL """
     url = "/flim/flam/flom"
     page = pagetemplate.url_not_found_page(url)
     expect_data = "...%(url)s..." % vars()
     page_data = page.serialise()
     self.failUnlessOutputCheckerMatch(expect_data, page_data)