From 89968dce0273f49cf34e07480077f7843593f54e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 4 Feb 2010 18:32:36 +0000 Subject: - Fix a bug whereby a ``renderer`` argument to the ``@bfg_view`` decorator that provided a package-relative template filename might not have been resolved properly. Symptom: inappropriate ``Missing template resource`` errors. --- repoze/bfg/tests/test_integration.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'repoze/bfg/tests/test_integration.py') diff --git a/repoze/bfg/tests/test_integration.py b/repoze/bfg/tests/test_integration.py index 35d113c5f..41144f7c3 100644 --- a/repoze/bfg/tests/test_integration.py +++ b/repoze/bfg/tests/test_integration.py @@ -151,6 +151,23 @@ class TestRestBugApp(TwillBase): self.assertEqual(browser.get_code(), 200) self.assertEqual(browser.get_html(), 'gotten') +class TestViewDecoratorApp(TwillBase): + config = 'repoze.bfg.tests.viewdecoratorapp:configure.zcml' + def test_it(self): + import twill.commands + browser = twill.commands.get_browser() + browser.go('http://localhost:6543/first') + self.assertEqual(browser.get_code(), 200) + self.failUnless('OK' in browser.get_html()) + + browser.go('http://localhost:6543/second') + self.assertEqual(browser.get_code(), 200) + self.failUnless('OK2' in browser.get_html()) + + browser.go('http://localhost:6543/third') + self.assertEqual(browser.get_code(), 200) + self.failUnless('OK3' in browser.get_html()) + class DummyContext(object): pass -- cgit v1.2.3