diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-06-28 19:16:23 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-06-28 19:16:23 +0200 |
commit | 8d2239f24f6a54d98201413d4f46256df0d6a5f3 (patch) | |
tree | cd3685e0bd87441eab4888efbc4e14a232a65a7b /test/git/test_blob.py | |
parent | 58fb1187b7b8f1e62d3930bdba9be5aba47a52c6 (diff) | |
parent | 1fe889ea0cb2547584075dc1eb77f52c54b9a8c4 (diff) | |
download | gitpython-8d2239f24f6a54d98201413d4f46256df0d6a5f3.tar.gz |
Merge branch 'sha20'
Diffstat (limited to 'test/git/test_blob.py')
-rw-r--r-- | test/git/test_blob.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/test/git/test_blob.py b/test/git/test_blob.py index cf70cb8c..e5fca0a6 100644 --- a/test/git/test_blob.py +++ b/test/git/test_blob.py @@ -6,25 +6,23 @@ from test.testlib import * from git import * +from gitdb.util import hex_to_bin class TestBlob(TestBase): def test_should_cache_data(self): bid = 'a802c139d4767c89dcad79d836d05f7004d39aac' - blob = Blob(self.rorepo, bid) + blob = Blob(self.rorepo, hex_to_bin(bid)) blob.data assert blob.data blob.size blob.size def test_mime_type_should_return_mime_type_for_known_types(self): - blob = Blob(self.rorepo, **{'sha': 'abc', 'path': 'foo.png'}) + blob = Blob(self.rorepo, **{'binsha': Blob.NULL_BIN_SHA, 'path': 'foo.png'}) assert_equal("image/png", blob.mime_type) def test_mime_type_should_return_text_plain_for_unknown_types(self): - blob = Blob(self.rorepo, **{'sha': 'abc','path': 'something'}) + blob = Blob(self.rorepo, **{'binsha': Blob.NULL_BIN_SHA,'path': 'something'}) assert_equal("text/plain", blob.mime_type) - def test_should_return_appropriate_representation(self): - blob = Blob(self.rorepo, **{'sha': 'abc'}) - assert_equal('<git.Blob "abc">', repr(blob)) |