From 00cfee09ebc72bc09743755be37833445872bbac Mon Sep 17 00:00:00 2001 From: Louis des Landes Date: Thu, 19 May 2016 13:23:28 +1000 Subject: [PATCH] If a test app exists, reset it for each test Conflicts: ckan/tests/helpers.py --- ckan/tests/helpers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ckan/tests/helpers.py b/ckan/tests/helpers.py index 729f21269cf..f7c8e25dada 100644 --- a/ckan/tests/helpers.py +++ b/ckan/tests/helpers.py @@ -187,7 +187,9 @@ def _apply_config_changes(cls, cfg): def setup(self): '''Reset the database and clear the search indexes.''' reset_db() - search.clear() + if hasattr(self, '_test_app'): + self._test_app.reset() + search.clear_all() @classmethod def teardown_class(cls):