blob: 34572b37e0f53e0193e10c8c74ea3a8d13a16969 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
"""Test for object db"""
from test.testlib import *
from git import Blob
from git.odb.utils import (
to_hex_sha,
to_bin_sha
)
class TestUtils(TestBase):
def test_basics(self):
assert to_hex_sha(Blob.NULL_HEX_SHA) == Blob.NULL_HEX_SHA
assert len(to_bin_sha(Blob.NULL_HEX_SHA)) == 20
assert to_hex_sha(to_bin_sha(Blob.NULL_HEX_SHA)) == Blob.NULL_HEX_SHA
|