Permalink
Browse files

Merge pull request #95 from LeResKP/develop

Fix cache and genshi template in the tests
  • Loading branch information...
ralphbean committed Sep 19, 2013
2 parents 47dfd51 + cd5febe commit 9f54d72be754c6087a0a780c6d89e4761924af23
Showing with 9 additions and 0 deletions.
  1. +9 −0 tw2/core/testbase/base.py
@@ -168,6 +168,9 @@ def setUp(self):
_request_local = {}
_request_id = None
# Clean up the cache
templating.engine_name_cache = {}
super(WidgetTest, self).setUp()
self.mw = tmw.make_middleware(
@@ -197,6 +200,12 @@ def _get_all_possible_engines(self):
def _check_rendering_vs_expected(self, engine, attrs, params, expected):
if self.engines and engine not in self.engines:
raise SkipTest("%r not in engines %r" % (engine, self.engines))
if engine == 'genshi':
# Since version 0.7.x genshi doesn't add empty attributes like in
# the other templating systems we remove the empty value
expected = expected.replace(' value=""', '')
_request_id = None
templating.engine_name_cache = {}
mw = tmw.make_middleware(None, preferred_rendering_engines=[engine])

0 comments on commit 9f54d72

Please sign in to comment.