##// END OF EJS Templates
chore(tests): fixed some broken bad tests
super-admin -
r5225:9f604a24 default
parent child Browse files
Show More
@@ -88,26 +88,32 b' class TestCommitsInNonEmptyRepo(BackendT'
88 @pytest.mark.backends("git", "hg")
88 @pytest.mark.backends("git", "hg")
89 def test_new_head_in_default_branch(self):
89 def test_new_head_in_default_branch(self):
90 tip = self.repo.get_commit()
90 tip = self.repo.get_commit()
91 self.imc.add(FileNode(b'docs/index.txt', content=b'Documentation\n'))
91
92 self.imc.add(
93 FileNode(b"docs/index.txt", content=b"Documentation\n")
94 )
92 foobar_tip = self.imc.commit(
95 foobar_tip = self.imc.commit(
93 message='New branch: foobar',
96 message="New branch: foobar",
94 author='joe <joe@rhodecode.com>',
97 author="joe <joe@rhodecode.com>",
95 branch='foobar',
98 branch="foobar",
96 parents=[tip],
99 parents=[tip],
97 )
100 )
98 self.imc.change(FileNode(b'docs/index.txt', content=b'Documentation\nand more...\n'))
101 self.imc.change(
102 FileNode(b"docs/index.txt", content=b"Documentation\nand more...\n")
103 )
104 assert foobar_tip.branch == "foobar"
99 newtip = self.imc.commit(
105 newtip = self.imc.commit(
100 message='At default branch',
106 message="At foobar_tip branch",
101 author='joe <joe@rhodecode.com>',
107 author="joe <joe@rhodecode.com>",
102 branch=foobar_tip.branch,
108 branch=foobar_tip.branch,
103 parents=[foobar_tip],
109 parents=[foobar_tip],
104 )
110 )
105
111
106 newest_tip = self.imc.commit(
112 newest_tip = self.imc.commit(
107 message='Merged with %s' % foobar_tip.raw_id,
113 message=f"Merged with {foobar_tip.raw_id}",
108 author='joe <joe@rhodecode.com>',
114 author="joe <joe@rhodecode.com>",
109 branch=self.backend_class.DEFAULT_BRANCH_NAME,
115 branch=self.backend_class.DEFAULT_BRANCH_NAME,
110 parents=[newtip, foobar_tip],
116 parents=[tip, newtip],
111 )
117 )
112
118
113 assert newest_tip.branch == self.backend_class.DEFAULT_BRANCH_NAME
119 assert newest_tip.branch == self.backend_class.DEFAULT_BRANCH_NAME
General Comments 0
You need to be logged in to leave comments. Login now