# HG changeset patch # User Thomas De Schampheleire # Date 2016-12-13 18:37:24 # Node ID 26fb17b4f9252fec99b1c4eb02a655e12d7caed8 # Parent e1ab826131334150b1f003e26de3207c34fc6e67 tests: remove custom test_context All test_context callers now use tg.util.webtest.test_context. The custom kallithea.tests.test_context.test_context was only temporarily added for the transition from Pylons to Turbogears2. diff --git a/kallithea/tests/test_context.py b/kallithea/tests/test_context.py deleted file mode 100644 --- a/kallithea/tests/test_context.py +++ /dev/null @@ -1,18 +0,0 @@ -# Based on Turbogears2 2.3.8: util/webtest.py but almost entirely stripped -# and translator bits added. - -import pylons -from pylons.i18n.translation import _get_translator - -class test_context(object): - def __init__(self, app): - self._app = app - - def __enter__(self): - # Initialize a translator for tests that utilize i18n - translator = _get_translator(pylons.config.get('lang')) - pylons.translator._push_object(translator) - return self._app - - def __exit__(self, exc_type, exc_val, exc_tb): - pylons.translator._pop_object()