1
1
from commit_check import PASS , FAIL
2
- from commit_check .commit import check_commit
2
+ from commit_check .commit import check_commit_msg
3
3
4
4
# used by get_commits_info mock
5
5
FAKE_BRANCH_NAME = "fake_commits_info"
6
- # The location of check_commit ()
6
+ # The location of check_commit_msg ()
7
7
LOCATION = "commit_check.commit"
8
8
9
9
@@ -22,7 +22,7 @@ def test_check_commit(self, mocker):
22
22
"re.match" ,
23
23
return_value = "fake_rematch_resp"
24
24
)
25
- retval = check_commit (checks )
25
+ retval = check_commit_msg (checks )
26
26
assert retval == PASS
27
27
assert m_get_commits_info .call_count == 1
28
28
assert m_re_match .call_count == 1
@@ -38,7 +38,7 @@ def test_check_commit_with_empty_checks(self, mocker):
38
38
"re.match" ,
39
39
return_value = "fake_commits_info"
40
40
)
41
- retval = check_commit (checks )
41
+ retval = check_commit_msg (checks )
42
42
assert retval == PASS
43
43
assert m_get_commits_info .call_count == 0
44
44
assert m_re_match .call_count == 0
@@ -57,7 +57,7 @@ def test_check_commit_with_different_check(self, mocker):
57
57
"re.match" ,
58
58
return_value = "fake_commits_info"
59
59
)
60
- retval = check_commit (checks )
60
+ retval = check_commit_msg (checks )
61
61
assert retval == PASS
62
62
assert m_get_commits_info .call_count == 0
63
63
assert m_re_match .call_count == 0
@@ -78,7 +78,7 @@ def test_check_commit_with_len0_regex(self, mocker, capfd):
78
78
"re.match" ,
79
79
return_value = "fake_rematch_resp"
80
80
)
81
- retval = check_commit (checks )
81
+ retval = check_commit_msg (checks )
82
82
assert retval == PASS
83
83
assert m_get_commits_info .call_count == 0
84
84
assert m_re_match .call_count == 0
@@ -107,7 +107,7 @@ def test_check_commit_with_result_none(self, mocker):
107
107
m_print_suggestion = mocker .patch (
108
108
f"{ LOCATION } .print_suggestion"
109
109
)
110
- retval = check_commit (checks )
110
+ retval = check_commit_msg (checks )
111
111
assert retval == FAIL
112
112
assert m_get_commits_info .call_count == 1
113
113
assert m_re_match .call_count == 1
0 commit comments