diff options
author | Florian Apolloner <florian@apolloner.eu> | 2008-10-31 22:46:47 +0100 |
---|---|---|
committer | Michael Trier <mtrier@gmail.com> | 2008-12-15 12:09:45 -0500 |
commit | dc1fcf372878240e0a1af20641d361f14aea7252 (patch) | |
tree | cfb0a64a630f857aa86f8afdb6a88b10a9c70c6e /test/git/test_blob.py | |
parent | b00f3689aa19938c10576580fbfc9243d9f3866c (diff) | |
download | gitpython-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_blob.py')
-rw-r--r-- | test/git/test_blob.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/git/test_blob.py b/test/git/test_blob.py index 2f43e82f..fb7fc890 100644 --- a/test/git/test_blob.py +++ b/test/git/test_blob.py @@ -12,7 +12,7 @@ class TestBlob(object): def setup(self): self.repo = Repo(GIT_REPO) - @patch(Git, '_call_process') + @patch_object(Git, '_call_process') def test_should_return_blob_contents(self, git): git.return_value = fixture('cat_file_blob') blob = Blob(self.repo, **{'id': 'abc'}) @@ -20,7 +20,7 @@ class TestBlob(object): assert_true(git.called) assert_equal(git.call_args, (('cat_file', 'abc'), {'p': True, 'with_raw_output': True})) - @patch(Git, '_call_process') + @patch_object(Git, '_call_process') def test_should_return_blob_contents_with_newline(self, git): git.return_value = fixture('cat_file_blob_nl') blob = Blob(self.repo, **{'id': 'abc'}) @@ -28,7 +28,7 @@ class TestBlob(object): assert_true(git.called) assert_equal(git.call_args, (('cat_file', 'abc'), {'p': True, 'with_raw_output': True})) - @patch(Git, '_call_process') + @patch_object(Git, '_call_process') def test_should_cache_data(self, git): git.return_value = fixture('cat_file_blob') blob = Blob(self.repo, **{'id': 'abc'}) @@ -38,7 +38,7 @@ class TestBlob(object): assert_equal(git.call_count, 1) assert_equal(git.call_args, (('cat_file', 'abc'), {'p': True, 'with_raw_output': True})) - @patch(Git, '_call_process') + @patch_object(Git, '_call_process') def test_should_return_file_size(self, git): git.return_value = fixture('cat_file_blob_size') blob = Blob(self.repo, **{'id': 'abc'}) @@ -46,12 +46,12 @@ class TestBlob(object): assert_true(git.called) assert_equal(git.call_args, (('cat_file', 'abc'), {'s': True})) - @patch(Git, '_call_process') + @patch_object(Git, '_call_process') def test_should_cache_file_size(self, git): git.return_value = fixture('cat_file_blob_size') blob = Blob(self.repo, **{'id': 'abc'}) assert_equal(11, blob.size) - assert_equal(11, blob.size) + assert_equal(11, blob.size) assert_true(git.called) assert_equal(git.call_count, 1) assert_equal(git.call_args, (('cat_file', 'abc'), {'s': True})) @@ -64,7 +64,7 @@ class TestBlob(object): blob = Blob(self.repo, **{'id': 'abc'}) assert_equal("text/plain", blob.mime_type) - @patch(Git, '_call_process') + @patch_object(Git, '_call_process') def test_should_display_blame_information(self, git): git.return_value = fixture('blame') b = Blob.blame(self.repo, 'master', 'lib/git.py') |