Mercurial > kallithea
changeset 6469:62eedbae0558
tests: remove intermediate init_stack method
Grafted and modified by Mads Kiilerich.
author | Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> |
---|---|
date | Fri, 23 Dec 2016 21:29:53 +0100 |
parents | b35f74c2d661 |
children | 8377f2bfb88f |
files | kallithea/tests/base.py |
diffstat | 1 files changed, 3 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/tests/base.py Tue Jan 17 18:20:17 2017 +0100 +++ b/kallithea/tests/base.py Fri Dec 23 21:29:53 2016 +0100 @@ -146,14 +146,7 @@ @pytest.fixture(autouse=True) def app_fixture(self): - self.wsgiapp = pylons.test.pylonsapp - self.init_stack(self.wsgiapp.config) - self.app = TestApp(self.wsgiapp) - return self.app - - def init_stack(self, config=None): - if not config: - config = pylons.test.pylonsapp.config + config = pylons.test.pylonsapp.config url._push_object(URLGenerator(config['routes.map'], environ)) pylons.app_globals._push_object(config['pylons.app_globals']) pylons.config._push_object(config) @@ -163,6 +156,8 @@ pylons.translator._push_object(translator) h = NullHandler() logging.getLogger("kallithea").addHandler(h) + self.app = TestApp(pylons.test.pylonsapp) + return self.app def remove_all_notifications(self): # query().delete() does not (by default) trigger cascades