diff options
| author | Michael Merickel <michael@merickel.org> | 2013-07-14 20:43:09 -0500 |
|---|---|---|
| committer | Michael Merickel <michael@merickel.org> | 2013-07-14 20:43:09 -0500 |
| commit | 6c38039e37cf134615e773968644686fdc5012a6 (patch) | |
| tree | 5e575425dfc1681b2ca4c66941b1c5d560b9f8fb | |
| parent | 17a2b9fb88f066d51c57d73ceb36b1a242bc4180 (diff) | |
| parent | f3bffdfc35a5ecbb45b5f63bdb08bdc41553b63d (diff) | |
| download | pyramid-6c38039e37cf134615e773968644686fdc5012a6.tar.gz pyramid-6c38039e37cf134615e773968644686fdc5012a6.tar.bz2 pyramid-6c38039e37cf134615e773968644686fdc5012a6.zip | |
Merge branch 'master' of lrowe/pyramid into pull.1004
| -rw-r--r-- | CONTRIBUTORS.txt | 2 | ||||
| -rw-r--r-- | pyramid/router.py | 2 | ||||
| -rw-r--r-- | pyramid/tests/test_router.py | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 61155ca80..d2b116f46 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -200,3 +200,5 @@ Contributors - Jason McKellar, 2013/03/28 - Luke Cyca, 2013/05/30 + +- Laurence Rowe, 2013/04/24 diff --git a/pyramid/router.py b/pyramid/router.py index df1f02b22..3d2a2ff3e 100644 --- a/pyramid/router.py +++ b/pyramid/router.py @@ -164,7 +164,7 @@ class Router(object): except PredicateMismatch: # look for other views that meet the predicate # criteria - for iface in context_iface.flattened(): + for iface in context_iface.__sro__[1:]: view_callable = adapters.lookup( (IViewClassifier, request.request_iface, iface), IView, name=view_name, default=None) diff --git a/pyramid/tests/test_router.py b/pyramid/tests/test_router.py index 432959147..b836d7d72 100644 --- a/pyramid/tests/test_router.py +++ b/pyramid/tests/test_router.py @@ -1180,11 +1180,9 @@ class TestRouter(unittest.TestCase): from pyramid.interfaces import IViewClassifier from pyramid.interfaces import IRequest, IResponse from pyramid.response import Response - from zope.interface import Interface, implementer - class IContext(Interface): + class BaseContext: pass - @implementer(IContext) - class DummyContext: + class DummyContext(BaseContext): pass context = DummyContext() self._registerTraverserFactory(context) @@ -1193,7 +1191,7 @@ class TestRouter(unittest.TestCase): DummyContext) good_view = DummyView('abc') self._registerView(self.config.derive_view(good_view), - '', IViewClassifier, IRequest, IContext) + '', IViewClassifier, IRequest, BaseContext) router = self._makeOne() def make_response(s): return Response(s) |
