Chris McDonough
2011-08-10 07980e5eed8e632c7b181a343c5b2d256cc04b77
- Fixed an issue with the default renderer not working at certain times.  See
https://github.com/Pylons/pyramid/issues/249

Closes #249.
3 files modified
16 ■■■■■ changed files
CHANGES.txt 6 ●●●●● patch | view | raw | blame | history
pyramid/renderers.py 3 ●●●● patch | view | raw | blame | history
pyramid/tests/test_renderers.py 7 ●●●●● patch | view | raw | blame | history
CHANGES.txt
@@ -18,6 +18,12 @@
  by the Pyramid router, after which it will be the result of
  ``sys.exc_info()``.
Bug Fixes
---------
- Fixed an issue with the default renderer not working at certain times.  See
  https://github.com/Pylons/pyramid/issues/249
1.1 (2011-07-22)
================
pyramid/renderers.py
@@ -352,7 +352,8 @@
        if name and '.' in name:
            rtype = os.path.splitext(name)[1]
        else:
            rtype = name
            # important.. must be a string; cannot be None; see issue 249
            rtype = name or ''
        if registry is None:
            registry = get_current_registry()
pyramid/tests/test_renderers.py
@@ -486,6 +486,13 @@
        helper = self._makeOne(registry=Dummy)
        self.assertEqual(helper.settings, {})
    def test_settings_registry_name_is_None(self):
        class Dummy(object):
            settings = None
        helper = self._makeOne(registry=Dummy)
        self.assertEqual(helper.name, None)
        self.assertEqual(helper.type, '')
    def test_settings_registry_settings_is_not_None(self):
        class Dummy(object):
            settings = {'a':1}