Permalink
Browse files

Removed unnecessary "reset_engine_name_cache"

  • Loading branch information...
ralphbean committed Apr 28, 2012
1 parent 0e4c40e commit 2b3ed27a7b629e997b0c48c5d7354aed181fb0b8
Showing with 3 additions and 8 deletions.
  1. +2 −2 tests/testapi.py
  2. +0 −5 tw2/core/template.py
  3. +1 −1 tw2/core/testbase/base.py
@@ -1,14 +1,14 @@
import tw2.core as twc
import tw2.core.template
from tw2.core.testbase import base
from tw2.core.template import reset_engine_name_cache
twc.core.request_local = base.request_local_tst
def setup():
base._request_local = {}
base._request_id = None
reset_engine_name_cache()
tw2.core.template.engine_name_cache = {}
def request(requestid, mw=None):
@@ -37,11 +37,6 @@ def template_available(template_name, engine_name, mw=None):
engine_name_cache = {}
def reset_engine_name_cache():
global engine_name_cache
engine_name_cache = {}
engine_error_template = """Could not find template for: %s. You may need to
specify a template engine name in the widget like mako:%s, or change the
middleware setup to include the template's templating language in your
@@ -215,7 +215,7 @@ def _get_all_possible_engines(self):
def _check_rendering_vs_expected(self, engine, attrs, params, expected):
_request_id = None
template.reset_engine_name_cache()
template.engine_name_cache = {}
mw = tmw.make_middleware(None, preferred_rendering_engines=[engine])
self.request(1, mw)
r = self.widget(_no_autoid=True, **attrs).display(**params)

0 comments on commit 2b3ed27

Please sign in to comment.