Commits

Florent Aide  committed 0fe5c19

Re-enabling all the chameleon tests. They work flawlessly here on
a linux x64 machine. I will test some more tomorrow on a Windows
machine...

  • Participants
  • Parent commits fff48b1

Comments (0)

Files changed (5)

File tg/test_stack/__init__.py

             values = {}
         AppConfig.__init__(self)
         #First we setup some base values that we know will work
-        self.renderers = ['genshi', 'mako', 'jinja','json']
+        self.renderers = ['genshi', 'mako', 'chameleon_genshi', 'jinja','json']
         self.render_functions = tg.util.Bunch()
         self.package = tg.test_stack
         self.default_renderer = 'genshi'

File tg/test_stack/rendering/controllers/root.py

     def jinja_inherits(self):
         return {}
 
-    #@expose('chameleon_genshi:index.html')
-    #def chameleon_genshi_index(self):
-    #    return {}
+    @expose('chameleon_genshi:index.html')
+    def chameleon_genshi_index(self):
+        return {}
 
-    #@expose('chameleon_genshi:genshi_inherits.html')
-    #def chameleon_genshi_inherits(self):
-    #    return {}
+    @expose('chameleon_genshi:genshi_inherits.html')
+    def chameleon_genshi_inherits(self):
+        return {}
 
     @expose('mako:mako_noop.mak')
     def mako_index(self):
     def mako_inherits(self):
         return {}
 
-    #@expose('chameleon_genshi:tg.test_stack.rendering.templates.index')
-    #def chameleon_index_dotted(self):
-    #    return {}
+    @expose('chameleon_genshi:tg.test_stack.rendering.templates.index')
+    def chameleon_index_dotted(self):
+        return {}
 
     @expose('genshi:tg.test_stack.rendering.templates.index')
     def index_dotted(self):

File tg/test_stack/rendering/test_dotted_rendering.py

                              )
     return app_from_config(base_config)
 
-#def test_default_chameleon_genshi_renderer():
-#    app = setup_noDB()
-#    resp = app.get('/chameleon_index_dotted')
-#    assert "Welcome" in resp, resp
-#    assert "TurboGears" in resp, resp
+def test_default_chameleon_genshi_renderer():
+    app = setup_noDB()
+    resp = app.get('/chameleon_index_dotted')
+    assert "Welcome" in resp, resp
+    assert "TurboGears" in resp, resp
 
 def test_default_genshi_renderer():
     app = setup_noDB()

File tg/test_stack/rendering/test_rendering.py

     assert "from sub-template: sub.frombottom" in resp
     assert "Master template" in resp
 
-# These tests are removed along with Chameleon Genshi support until 
-# there is full support for CG in tg2
+def test_chameleon_genshi_base():
+    app = setup_noDB()
+    resp = app.get('/chameleon_genshi_index')
+    assert "<p>TurboGears 2 is rapid web application development toolkit designed to make your life easier.</p>" in resp
 
-#def test_chameleon_genshi_base():
-#    app = setup_noDB()
-#    resp = app.get('/chameleon_genshi_index')
-#    assert "<p>TurboGears 2 is rapid web application development toolkit designed to make your life easier.</p>" in resp
-#
-#def test_chameleon_genshi_inheritance():
-#    app = setup_noDB()
-#    resp = app.get('/chameleon_genshi_inherits')
-#    assert "Inheritance template" in resp
-#    assert "Master template" in resp
+def test_chameleon_genshi_inheritance():
+    app = setup_noDB()
+    resp = app.get('/chameleon_genshi_inherits')
+    assert "Inheritance template" in resp
+    assert "Master template" in resp
 
 def _test_jinja_inherits():
     app = setup_noDB()

File tg/tests/test_configuration.py

     def test_setup_sa_auth_backend(self):
         self.config.setup_sa_auth_backend()
 
-    #def test_setup_chameleon_genshi_renderer(self):
-    #    self.config.paths.templates = 'template_path'
-    #    self.config.setup_chameleon_genshi_renderer()
+    def test_setup_chameleon_genshi_renderer(self):
+        self.config.paths.templates = 'template_path'
+        self.config.setup_chameleon_genshi_renderer()
 
     def test_setup_genshi_renderer(self):
         self.config.paths.templates = 'template_path'