Skip to content
Browse files

match_param was missing from the view_config decorator

  • Loading branch information...
1 parent b1e795e commit bf5e0e6ef7a3ed6154d45e7b3c0080215feaec5d Cameron Ring committed Oct 2, 2011
Showing with 4 additions and 2 deletions.
  1. +2 −1 pyramid/tests/test_view.py
  2. +2 −1 pyramid/view.py
View
3 pyramid/tests/test_view.py
@@ -276,13 +276,14 @@ def test_create_for_trumps_context_None(self):
def test_create_nondefaults(self):
decorator = self._makeOne(name=None, request_type=None, for_=None,
permission='foo', mapper='mapper',
- decorator='decorator')
+ decorator='decorator', match_param='match_param')
self.assertEqual(decorator.name, None)
self.assertEqual(decorator.request_type, None)
self.assertEqual(decorator.context, None)
self.assertEqual(decorator.permission, 'foo')
self.assertEqual(decorator.mapper, 'mapper')
self.assertEqual(decorator.decorator, 'decorator')
+ self.assertEqual(decorator.match_param, 'match_param')
def test_call_function(self):
decorator = self._makeOne()
View
3 pyramid/view.py
@@ -175,7 +175,7 @@ def __init__(self, name='', request_type=None, for_=None, permission=None,
containment=None, attr=None, renderer=None, wrapper=None,
xhr=False, accept=None, header=None, path_info=None,
custom_predicates=(), context=None, decorator=None,
- mapper=None, http_cache=None):
+ mapper=None, http_cache=None, match_param=None):
self.name = name
self.request_type = request_type
self.context = context or for_
@@ -195,6 +195,7 @@ def __init__(self, name='', request_type=None, for_=None, permission=None,
self.decorator = decorator
self.mapper = mapper
self.http_cache = http_cache
+ self.match_param = match_param
def __call__(self, wrapped):
settings = self.__dict__.copy()

0 comments on commit bf5e0e6

Please sign in to comment.
Something went wrong with that request. Please try again.