1763
1763
class TestShaFileByName(tests.TestCaseInTempDir):
1765
1765
def test_sha_empty(self):
1767
1767
expected_sha = osutils.sha_string('')
1768
1768
self.assertEqual(expected_sha, osutils.sha_file_by_name('foo'))
1770
1770
def test_sha_mixed_endings(self):
1772
1772
self.build_tree_contents([('foo', text)])
1773
1773
expected_sha = osutils.sha_string(text)
1774
1774
self.assertEqual(expected_sha, osutils.sha_file_by_name('foo'))