def test_git_verbose_branch_listing(self, fake_p): """ Find the branches commit hash. Verify * denoting current branch is removed. """ # find branches containing the commit fake_p.expects_call().returns( ' master fe942c68f40bc162746885a07ff4e40d6eeace7f 0.0.1 some feature commit message' ) assert ['master','fe942c68f40bc162746885a07ff4e40d6eeace7f','0.0.1','some','feature','commit','message'] ==\ forgit.git_merged('somecommit')
def test_git_merged(self, fake_p): """ Find the branches containing the commit. Verify * denoting current branch is removed. """ # find branches containing the commit fake_p.expects_call().returns( '* master\n'\ ' stage\n'\ ' feature_branch\n'\ ' feature_two_branch\n' ) assert ['master', 'stage', 'feature_branch', 'feature_two_branch'] == forgit.git_merged('somecommit')