MCPcopy
hub / github.com/cherrypy/cherrypy / test_5_Error_paths

Method test_5_Error_paths

cherrypy/test/test_session.py:314–324  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

312 self.getPage('/testStr', self.cookies)
313
314 def test_5_Error_paths(self):
315 self.getPage('/unknown/page')
316 self.assertErrorPage(404, "The path '/unknown/page' was not found.")
317
318 # Note: this path is *not* the same as above. The above
319 # takes a normal route through the session code; this one
320 # skips the session code's before_handler and only calls
321 # before_finalize (save) and on_end (close). So the session
322 # code has to survive calling save/close without init.
323 self.getPage('/restricted', self.cookies, method='POST')
324 self.assertErrorPage(405, response_codes[405][1])
325
326 def test_6_regenerate(self):
327 self.getPage('/testStr')

Callers

nothing calls this directly

Calls 2

getPageMethod · 0.80
assertErrorPageMethod · 0.80

Tested by

no test coverage detected