Mercurial > kallithea
changeset 6570:26fb17b4f925
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.
author | Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> |
---|---|
date | Tue, 13 Dec 2016 19:37:24 +0100 |
parents | e1ab82613133 |
children | 908e186abd8d |
files | kallithea/tests/test_context.py |
diffstat | 1 files changed, 0 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/tests/test_context.py Sun Jan 29 21:08:49 2017 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -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()