eduardo schettino committed 91d4307

added NoOpRenderer.

  • Participants
  • Parent commits a99b6ef

Comments (0)

Files changed (2)


         handler.response.write(json.dumps(context).replace("</", "<\\/"))
+class NoOpRenderer(object):
+    """No operation renderer, to be used when handler writes response"""
+    @staticmethod
+    def render(handler, **context):
+        pass
 class ConfigurableMetaclass(type):
     """adds an attribute (dict) 'a_config' to the class


 from avalanche.snow import _Mixer, make_handler
 from avalanche.snow import AvalancheException, ConfigurableMetaclass
 from avalanche.snow import _AvalancheHandler, BaseHandler
-from avalanche.snow import use_namespace, JsonRenderer, JinjaRenderer
+from avalanche.snow import use_namespace, NoOpRenderer
+from avalanche.snow import JsonRenderer, JinjaRenderer
+def test_noop_renderer():
+    assert NoOpRenderer().render(None) is None
 class Test_Mixer(object):
     def test_mix(self):