Permalink
Browse files

* Clean up cache

* Hack to fix the tests with empty value attributes for genshi
  • Loading branch information...
LeResKP committed Sep 19, 2013
1 parent 47dfd51 commit cd5febe2bc6c675fa8c7320731d4fe98c603c42d
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 cd5febe

Please sign in to comment.