summaryrefslogtreecommitdiff
path: root/repoze/bfg/tests/test_integration.py
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2010-02-04 13:02:41 +0000
committerChris McDonough <chrism@agendaless.com>2010-02-04 13:02:41 +0000
commit98e0d06a77fef4cec0266510f2d02975ce56c405 (patch)
tree3e59622fe467bc2ac4019c95c956f8ed43ce892c /repoze/bfg/tests/test_integration.py
parentcb968d991b5466286aa3d53af20d405c3c48a17c (diff)
downloadpyramid-98e0d06a77fef4cec0266510f2d02975ce56c405.tar.gz
pyramid-98e0d06a77fef4cec0266510f2d02975ce56c405.tar.bz2
pyramid-98e0d06a77fef4cec0266510f2d02975ce56c405.zip
- 1.2b4 introduced a bug whereby views added via a route configuration
that named a view callable and also a ``view_attr`` became broken. Symptom: ``MyViewClass is not callable`` or the ``__call__`` of a class was being called instead of the method named via ``view_attr``.
Diffstat (limited to 'repoze/bfg/tests/test_integration.py')
-rw-r--r--repoze/bfg/tests/test_integration.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/repoze/bfg/tests/test_integration.py b/repoze/bfg/tests/test_integration.py
index c033f0e03..35d113c5f 100644
--- a/repoze/bfg/tests/test_integration.py
+++ b/repoze/bfg/tests/test_integration.py
@@ -141,6 +141,16 @@ class TestHybridApp(TwillBase):
self.assertEqual(browser.get_code(), 200)
self.assertEqual(browser.get_html(), 'global2')
+class TestRestBugApp(TwillBase):
+ # test bug reported by delijati 2010/2/3 (http://pastebin.com/d4cc15515)
+ config = 'repoze.bfg.tests.restbugapp:configure.zcml'
+ def test_it(self):
+ import twill.commands
+ browser = twill.commands.get_browser()
+ browser.go('http://localhost:6543/pet')
+ self.assertEqual(browser.get_code(), 200)
+ self.assertEqual(browser.get_html(), 'gotten')
+
class DummyContext(object):
pass