# HG changeset patch # User Thomas De Schampheleire # Date 2016-02-11 12:13:50 # Node ID 2cc8d876d1c8806a7e5dea9df2a9c37ab278f047 # Parent 37d713674f63f299515fa26a44cee6766fa416a6 tests: summary: fix inter-test dependency Test test_index_trending depended on previous actions performed by the test test_index_statistics. Such inter-test dependencies should not be present. This would become a problem when converting the test class to pytest-style, because the app is recreated for each test, while the original TestController creates it once per class. diff --git a/kallithea/tests/functional/test_summary.py b/kallithea/tests/functional/test_summary.py --- a/kallithea/tests/functional/test_summary.py +++ b/kallithea/tests/functional/test_summary.py @@ -121,6 +121,9 @@ class TestSummaryController(TestControll self._enable_stats(HG_REPO) ScmModel().mark_for_invalidation(HG_REPO) + # generate statistics first + response = self.app.get(url(controller='summary', action='statistics', + repo_name=HG_REPO)) response = self.app.get(url(controller='summary', action='index', repo_name=HG_REPO)) response.mustcontain( @@ -151,6 +154,9 @@ class TestSummaryController(TestControll self._enable_stats(GIT_REPO) ScmModel().mark_for_invalidation(GIT_REPO) + # generate statistics first + response = self.app.get(url(controller='summary', action='statistics', + repo_name=GIT_REPO)) response = self.app.get(url(controller='summary', action='index', repo_name=GIT_REPO)) response.mustcontain(