diff --git a/rhodecode/tests/vcs/test_commits.py b/rhodecode/tests/vcs/test_commits.py --- a/rhodecode/tests/vcs/test_commits.py +++ b/rhodecode/tests/vcs/test_commits.py @@ -88,26 +88,32 @@ class TestCommitsInNonEmptyRepo(BackendT @pytest.mark.backends("git", "hg") def test_new_head_in_default_branch(self): tip = self.repo.get_commit() - self.imc.add(FileNode(b'docs/index.txt', content=b'Documentation\n')) + + self.imc.add( + FileNode(b"docs/index.txt", content=b"Documentation\n") + ) foobar_tip = self.imc.commit( - message='New branch: foobar', - author='joe ', - branch='foobar', + message="New branch: foobar", + author="joe ", + branch="foobar", parents=[tip], ) - self.imc.change(FileNode(b'docs/index.txt', content=b'Documentation\nand more...\n')) + self.imc.change( + FileNode(b"docs/index.txt", content=b"Documentation\nand more...\n") + ) + assert foobar_tip.branch == "foobar" newtip = self.imc.commit( - message='At default branch', - author='joe ', + message="At foobar_tip branch", + author="joe ", branch=foobar_tip.branch, parents=[foobar_tip], ) newest_tip = self.imc.commit( - message='Merged with %s' % foobar_tip.raw_id, - author='joe ', + message=f"Merged with {foobar_tip.raw_id}", + author="joe ", branch=self.backend_class.DEFAULT_BRANCH_NAME, - parents=[newtip, foobar_tip], + parents=[tip, newtip], ) assert newest_tip.branch == self.backend_class.DEFAULT_BRANCH_NAME