changeset 7126:5c0dc6fe1e40

tests: Use better/more logical assertion when testing creation of new branches
author Branko Majic <branko@majic.rs>
date Sun, 11 Feb 2018 00:14:52 +0100
parents 2a96678c8cd9
children f235038d6902
files kallithea/tests/vcs/test_changesets.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/tests/vcs/test_changesets.py	Sat Feb 10 19:10:39 2018 +0100
+++ b/kallithea/tests/vcs/test_changesets.py	Sun Feb 11 00:14:52 2018 +0100
@@ -79,8 +79,8 @@
         assert 'foobar' in self.repo.branches
         assert foobar_tip.branch == 'foobar'
         # 'foobar' should be the only branch that contains the new commit
-        branches = self.repo.branches.values()
-        assert branches[0] != branches[1]
+        branch_tips = self.repo.branches.values()
+        assert branch_tips.count(str(foobar_tip.raw_id)) == 1
 
     def test_new_head_in_default_branch(self):
         tip = self.repo.get_changeset()