| | |
| | | start_response = DummyStartResponse() |
| | | why = exc_raised(HTTPNotFound, router, environ, start_response) |
| | | self.assertTrue( |
| | | "debug_notfound of url http://localhost:8080/; path_info: '/', " |
| | | "context:" in why[0]) |
| | | "debug_notfound of url http://localhost:8080/; " in why[0]) |
| | | self.assertTrue("view_name: '', subpath: []" in why[0]) |
| | | self.assertTrue('http://localhost:8080' in why[0], why) |
| | | |
| | | self.assertEqual(len(logger.messages), 1) |
| | | message = logger.messages[0] |
| | | self.assertTrue('of url http://localhost:8080' in message) |
| | | self.assertTrue("path_info: '/'" in message) |
| | | self.assertTrue("path_info: " in message) |
| | | self.assertTrue('DummyContext instance at' in message) |
| | | self.assertTrue("view_name: ''" in message) |
| | | self.assertTrue("subpath: []" in message) |
| | |
| | | "route matched for url http://localhost:8080" |
| | | "/archives/action1/article1; " |
| | | "route_name: 'foo', " |
| | | "path_info: '/archives/action1/article1', " |
| | | "pattern: 'archives/:action/:article', ")) |
| | | "path_info: ")) |
| | | |
| | | def test_call_route_match_miss_debug_routematch(self): |
| | | from pyramid.httpexceptions import HTTPNotFound |