@@ -11,7 +11,7 @@ class TestCommit(object):
11
11
def setup (self ):
12
12
self .repo = Repo (GIT_REPO )
13
13
14
- @patch (Git , '_call_process' )
14
+ @patch_object (Git , '_call_process' )
15
15
def test_bake (self , git ):
16
16
git .return_value = fixture ('rev_list_single' )
17
17
@@ -24,12 +24,12 @@ def test_bake(self, git):
24
24
assert_true (git .called )
25
25
assert_equal (git .call_args , (('rev_list' , '4c8124ffcf4039d292442eeccabdeca5af5c5017' ), {'pretty' : 'raw' , 'max_count' : 1 }))
26
26
27
- @patch (Git , '_call_process' )
27
+ @patch_object (Git , '_call_process' )
28
28
def test_id_abbrev (self , git ):
29
29
git .return_value = fixture ('rev_list_commit_idabbrev' )
30
30
assert_equal ('80f136f' , self .repo .commit ('80f136f500dfdb8c3e8abf4ae716f875f0a1b57f' ).id_abbrev )
31
31
32
- @patch (Git , '_call_process' )
32
+ @patch_object (Git , '_call_process' )
33
33
def test_diff (self , git ):
34
34
git .return_value = fixture ('diff_p' )
35
35
@@ -54,7 +54,7 @@ def test_diff(self, git):
54
54
assert_true (git .called )
55
55
assert_equal (git .call_args , (('diff' , 'master' ), {'full_index' : True }))
56
56
57
- @patch (Git , '_call_process' )
57
+ @patch_object (Git , '_call_process' )
58
58
def test_diff_with_two_commits (self , git ):
59
59
git .return_value = fixture ('diff_2' )
60
60
@@ -65,7 +65,7 @@ def test_diff_with_two_commits(self, git):
65
65
assert_true (git .called )
66
66
assert_equal (git .call_args , (('diff' , '59ddc32' , '13d27d5' ), {'full_index' : True }))
67
67
68
- @patch (Git , '_call_process' )
68
+ @patch_object (Git , '_call_process' )
69
69
def test_diff_with_files (self , git ):
70
70
git .return_value = fixture ('diff_f' )
71
71
@@ -77,7 +77,7 @@ def test_diff_with_files(self, git):
77
77
assert_true (git .called )
78
78
assert_equal (git .call_args , (('diff' , '59ddc32' , '--' , 'lib' ), {'full_index' : True }))
79
79
80
- @patch (Git , '_call_process' )
80
+ @patch_object (Git , '_call_process' )
81
81
def test_diff_with_two_commits_and_files (self , git ):
82
82
git .return_value = fixture ('diff_2f' )
83
83
@@ -89,7 +89,7 @@ def test_diff_with_two_commits_and_files(self, git):
89
89
assert_true (git .called )
90
90
assert_equal (git .call_args , (('diff' , '59ddc32' , '13d27d5' , '--' , 'lib' ), {'full_index' : True }))
91
91
92
- @patch (Git , '_call_process' )
92
+ @patch_object (Git , '_call_process' )
93
93
def test_diffs (self , git ):
94
94
git .return_value = fixture ('diff_p' )
95
95
@@ -117,7 +117,7 @@ def test_diffs(self, git):
117
117
'91169e1f5fa4de2eaea3f176461f5dc784796769' ,
118
118
), {'full_index' : True }))
119
119
120
- @patch (Git , '_call_process' )
120
+ @patch_object (Git , '_call_process' )
121
121
def test_diffs_on_initial_import (self , git ):
122
122
git .return_value = fixture ('diff_i' )
123
123
@@ -144,7 +144,7 @@ def test_diffs_on_initial_import(self, git):
144
144
assert_true (git .called )
145
145
assert_equal (git .call_args , (('show' , '634396b2f541a9f2d58b00be1a07f0c358b999b3' ), {'full_index' : True , 'pretty' : 'raw' }))
146
146
147
- @patch (Git , '_call_process' )
147
+ @patch_object (Git , '_call_process' )
148
148
def test_diffs_on_initial_import_with_empty_commit (self , git ):
149
149
git .return_value = fixture ('show_empty_commit' )
150
150
@@ -156,7 +156,7 @@ def test_diffs_on_initial_import_with_empty_commit(self, git):
156
156
assert_true (git .called )
157
157
assert_equal (git .call_args , (('show' , '634396b2f541a9f2d58b00be1a07f0c358b999b3' ), {'full_index' : True , 'pretty' : 'raw' }))
158
158
159
- @patch (Git , '_call_process' )
159
+ @patch_object (Git , '_call_process' )
160
160
def test_diffs_with_mode_only_change (self , git ):
161
161
git .return_value = fixture ('diff_mode_only' )
162
162
@@ -171,7 +171,7 @@ def test_diffs_with_mode_only_change(self, git):
171
171
assert_true (git .called )
172
172
assert_equal (git .call_args , (('show' , '91169e1f5fa4de2eaea3f176461f5dc784796769' ), {'full_index' : True , 'pretty' : 'raw' }))
173
173
174
- @patch (Git , '_call_process' )
174
+ @patch_object (Git , '_call_process' )
175
175
def test_stats (self , git ):
176
176
git .return_value = fixture ('diff_numstat' )
177
177
@@ -186,7 +186,7 @@ def test_stats(self, git):
186
186
assert_true (git .called )
187
187
assert_equal (git .call_args , (('diff' , '634396b2f541a9f2d58b00be1a07f0c358b999b3' ), {'numstat' : True }))
188
188
189
- @patch (Git , '_call_process' )
189
+ @patch_object (Git , '_call_process' )
190
190
def test_rev_list_bisect_all (self , git ):
191
191
"""
192
192
'git rev-list --bisect-all' returns additional information
0 commit comments