Add unit test for method create_tree() from Index class

This commit is contained in:
Sarath Lakshman
2011-04-07 14:07:48 +05:30
parent e7fe537626
commit 014388c995

View File

@@ -88,6 +88,13 @@ class IndexTest(utils.RepoTestCase):
index.read()
self.assertTrue('bye.txt' in index)
def test_create_tree(self):
sha = 'fd937514cb799514d4b81bb24c5fcfeb6472b245'
index = self.repo.index
index.read()
tree = index.create_tree()
self.assertEqual(sha, tree.sha)
if __name__ == '__main__':
unittest.main()