Changeset - 2cc8d876d1c8
[Not reviewed]
default
0 1 0
Thomas De Schampheleire - 10 years ago 2016-02-11 12:13:50
thomas.de.schampheleire@gmail.com
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.
1 file changed with 6 insertions and 0 deletions:
0 comments (0 inline, 0 general)
kallithea/tests/functional/test_summary.py
Show inline comments
 
@@ -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(
0 comments (0 inline, 0 general)