- Fix ``pyramid.config.preserve_view_attrs`` to not choke when the view it is
passed is ``None`` (FBO: pyramid_formish).
| | |
| | | Next release |
| | | ============ |
| | | |
| | | Bug Fixes |
| | | --------- |
| | | |
| | | - Fix ``pyramid.config.preserve_view_attrs`` to not choke when the view it is |
| | | passed is ``None`` (FBO: pyramid_formish). |
| | | |
| | | 1.1.1 (2011-08-13) |
| | | ================== |
| | | |
| | |
| | | if wrapper is view: |
| | | return view |
| | | |
| | | if view is None: |
| | | return wrapper |
| | | |
| | | original_view = getattr(view, '__original_view__', None) |
| | | |
| | | if original_view is None: |
| | |
| | | result = self._callFUT(view, view) |
| | | self.assertTrue(result is view) |
| | | |
| | | def test_view_is_None(self): |
| | | def view(context, request): |
| | | """ """ |
| | | result = self._callFUT(None, view) |
| | | self.assertTrue(result is view) |
| | | |
| | | def test_it_different_with_existing_original_view(self): |
| | | def view1(context, request): pass |
| | | view1.__original_view__ = 'abc' |