added test for bad argspec for _lookup
This commit is contained in:
		@@ -103,6 +103,16 @@ class TestBase(TestCase):
 | 
				
			|||||||
        assert r.status_int == 200
 | 
					        assert r.status_int == 200
 | 
				
			||||||
        assert r.body == '/100/name'
 | 
					        assert r.body == '/100/name'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def test_lookup_with_wrong_argspec(self):
 | 
				
			||||||
 | 
					        class RootController(object):
 | 
				
			||||||
 | 
					            @expose()
 | 
				
			||||||
 | 
					            def _lookup(self, someID):
 | 
				
			||||||
 | 
					                return 'Bad arg spec'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        app = TestApp(Pecan(RootController()))
 | 
				
			||||||
 | 
					        r = app.get('/foo/bar', expect_errors=True)
 | 
				
			||||||
 | 
					        r.status_int == 404
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_controller_args(self):
 | 
					    def test_controller_args(self):
 | 
				
			||||||
        class RootController(object):
 | 
					        class RootController(object):
 | 
				
			||||||
            @expose()
 | 
					            @expose()
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user