@@ -34,7 +34,7 @@ def test_commit(config, mocker):
3434 }
3535
3636 commit_mock = mocker .patch ("commitizen.git.commit" )
37- commit_mock .return_value = cmd .Command ("success" , "" , "" , "" )
37+ commit_mock .return_value = cmd .Command ("success" , "" , "" , "" , 0 )
3838 success_mock = mocker .patch ("commitizen.out.success" )
3939
4040 commands .Commit (config , {})()
@@ -44,7 +44,7 @@ def test_commit(config, mocker):
4444@pytest .mark .usefixtures ("staging_is_clean" )
4545def test_commit_retry_fails_no_backup (config , mocker ):
4646 commit_mock = mocker .patch ("commitizen.git.commit" )
47- commit_mock .return_value = cmd .Command ("success" , "" , "" , "" )
47+ commit_mock .return_value = cmd .Command ("success" , "" , "" , "" , 0 )
4848
4949 with pytest .raises (NoCommitBackupError ) as excinfo :
5050 commands .Commit (config , {"retry" : True })()
@@ -65,7 +65,7 @@ def test_commit_retry_works(config, mocker):
6565 }
6666
6767 commit_mock = mocker .patch ("commitizen.git.commit" )
68- commit_mock .return_value = cmd .Command ("" , "error" , "" , "" )
68+ commit_mock .return_value = cmd .Command ("" , "error" , "" , "" , 9 )
6969 error_mock = mocker .patch ("commitizen.out.error" )
7070
7171 with pytest .raises (CommitError ):
@@ -79,7 +79,7 @@ def test_commit_retry_works(config, mocker):
7979
8080 # Previous commit failed, so retry should pick up the backup commit
8181 # commit_mock = mocker.patch("commitizen.git.commit")
82- commit_mock .return_value = cmd .Command ("success" , "" , "" , "" )
82+ commit_mock .return_value = cmd .Command ("success" , "" , "" , "" , 0 )
8383 success_mock = mocker .patch ("commitizen.out.success" )
8484
8585 commands .Commit (config , {"retry" : True })()
0 commit comments