MCPcopy Create free account
hub / github.com/commitizen-tools/commitizen / test_get_commits_without_email

Function test_get_commits_without_email

tests/test_git.py:134–160  ·  view source on GitHub ↗
(util: UtilFixture)

Source from the content-addressed store, hash-verified

132
133
134def test_get_commits_without_email(util: UtilFixture):
135 raw_commit = (
136 "a515bb8f71c403f6f7d1c17b9d8ebf2ce3959395\n"
137 "95bbfc703eb99cb49ba0d6ffd8469911303dbe63 12d3b4bdaa996ea7067a07660bb5df4772297bdd\n"
138 "\n"
139 "user name\n"
140 "\n"
141 "----------commit-delimiter----------\n"
142 "12d3b4bdaa996ea7067a07660bb5df4772297bdd\n"
143 "de33bc5070de19600f2f00262b3c15efea762408\n"
144 "feat(users): add username\n"
145 "user name\n"
146 "\n"
147 "----------commit-delimiter----------\n"
148 )
149 util.mock_cmd(out=raw_commit)
150
151 commits = git.get_commits()
152
153 assert commits[0].author == "user name"
154 assert commits[1].author == "user name"
155
156 assert commits[0].author_email == ""
157 assert commits[1].author_email == ""
158
159 assert commits[0].title == ""
160 assert commits[1].title == "feat(users): add username"
161
162
163def test_get_commits_without_breakline_in_each_commit(util: UtilFixture):

Callers

nothing calls this directly

Calls 1

mock_cmdMethod · 0.80

Tested by

no test coverage detected