summaryrefslogtreecommitdiff
path: root/test/git/test_commit.py
diff options
context:
space:
mode:
authorFlorian Apolloner <florian@apolloner.eu>2008-10-31 22:46:47 +0100
committerMichael Trier <mtrier@gmail.com>2008-12-15 12:09:45 -0500
commitdc1fcf372878240e0a1af20641d361f14aea7252 (patch)
treecfb0a64a630f857aa86f8afdb6a88b10a9c70c6e /test/git/test_commit.py
parentb00f3689aa19938c10576580fbfc9243d9f3866c (diff)
downloadgitpython-dc1fcf372878240e0a1af20641d361f14aea7252.tar.gz
Get compatible with mock0.4 (to some extend ;)). Just that Michael
doesn't need to do the same boring replacing I did. (cherry picked from commit 10c62aa69193a8bc7b46ca24c2ad1d5008489665)
Diffstat (limited to 'test/git/test_commit.py')
-rw-r--r--test/git/test_commit.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/git/test_commit.py b/test/git/test_commit.py
index 583a5079..e9336f2c 100644
--- a/test/git/test_commit.py
+++ b/test/git/test_commit.py
@@ -11,7 +11,7 @@ class TestCommit(object):
def setup(self):
self.repo = Repo(GIT_REPO)
- @patch(Git, '_call_process')
+ @patch_object(Git, '_call_process')
def test_bake(self, git):
git.return_value = fixture('rev_list_single')
@@ -24,12 +24,12 @@ class TestCommit(object):
assert_true(git.called)
assert_equal(git.call_args, (('rev_list', '4c8124ffcf4039d292442eeccabdeca5af5c5017'), {'pretty': 'raw', 'max_count': 1}))
- @patch(Git, '_call_process')
+ @patch_object(Git, '_call_process')
def test_id_abbrev(self, git):
git.return_value = fixture('rev_list_commit_idabbrev')
assert_equal('80f136f', self.repo.commit('80f136f500dfdb8c3e8abf4ae716f875f0a1b57f').id_abbrev)
- @patch(Git, '_call_process')
+ @patch_object(Git, '_call_process')
def test_diff(self, git):
git.return_value = fixture('diff_p')
@@ -54,7 +54,7 @@ class TestCommit(object):
assert_true(git.called)
assert_equal(git.call_args, (('diff', 'master'), {'full_index': True}))
- @patch(Git, '_call_process')
+ @patch_object(Git, '_call_process')
def test_diff_with_two_commits(self, git):
git.return_value = fixture('diff_2')
@@ -65,7 +65,7 @@ class TestCommit(object):
assert_true(git.called)
assert_equal(git.call_args, (('diff', '59ddc32', '13d27d5'), {'full_index': True}))
- @patch(Git, '_call_process')
+ @patch_object(Git, '_call_process')
def test_diff_with_files(self, git):
git.return_value = fixture('diff_f')
@@ -77,7 +77,7 @@ class TestCommit(object):
assert_true(git.called)
assert_equal(git.call_args, (('diff', '59ddc32', '--', 'lib'), {'full_index': True}))
- @patch(Git, '_call_process')
+ @patch_object(Git, '_call_process')
def test_diff_with_two_commits_and_files(self, git):
git.return_value = fixture('diff_2f')
@@ -89,7 +89,7 @@ class TestCommit(object):
assert_true(git.called)
assert_equal(git.call_args, (('diff', '59ddc32', '13d27d5', '--', 'lib'), {'full_index': True}))
- @patch(Git, '_call_process')
+ @patch_object(Git, '_call_process')
def test_diffs(self, git):
git.return_value = fixture('diff_p')
@@ -117,7 +117,7 @@ class TestCommit(object):
'91169e1f5fa4de2eaea3f176461f5dc784796769',
), {'full_index': True}))
- @patch(Git, '_call_process')
+ @patch_object(Git, '_call_process')
def test_diffs_on_initial_import(self, git):
git.return_value = fixture('diff_i')
@@ -144,7 +144,7 @@ class TestCommit(object):
assert_true(git.called)
assert_equal(git.call_args, (('show', '634396b2f541a9f2d58b00be1a07f0c358b999b3'), {'full_index': True, 'pretty': 'raw'}))
- @patch(Git, '_call_process')
+ @patch_object(Git, '_call_process')
def test_diffs_on_initial_import_with_empty_commit(self, git):
git.return_value = fixture('show_empty_commit')
@@ -156,7 +156,7 @@ class TestCommit(object):
assert_true(git.called)
assert_equal(git.call_args, (('show', '634396b2f541a9f2d58b00be1a07f0c358b999b3'), {'full_index': True, 'pretty': 'raw'}))
- @patch(Git, '_call_process')
+ @patch_object(Git, '_call_process')
def test_diffs_with_mode_only_change(self, git):
git.return_value = fixture('diff_mode_only')
@@ -171,7 +171,7 @@ class TestCommit(object):
assert_true(git.called)
assert_equal(git.call_args, (('show', '91169e1f5fa4de2eaea3f176461f5dc784796769'), {'full_index': True, 'pretty': 'raw'}))
- @patch(Git, '_call_process')
+ @patch_object(Git, '_call_process')
def test_stats(self, git):
git.return_value = fixture('diff_numstat')
@@ -186,7 +186,7 @@ class TestCommit(object):
assert_true(git.called)
assert_equal(git.call_args, (('diff', '634396b2f541a9f2d58b00be1a07f0c358b999b3'), {'numstat': True}))
- @patch(Git, '_call_process')
+ @patch_object(Git, '_call_process')
def test_rev_list_bisect_all(self, git):
"""
'git rev-list --bisect-all' returns additional information