controllers: rename "find" to "search" in prep for search menu work
[ugit.git] / t / t0001-git-commands.py
blob47defd1c0b8b8a5b21a19437d20ffa265cf81470
1 #!/usr/bin/env python
2 import os
3 import unittest
5 import testutils
6 from testmodel import TestModel
8 from ugit import git
10 class GitCommandTest(unittest.TestCase):
11 def testGitVersion(self):
12 version = git.version()
13 self.failUnless( version.startswith('git version') )
15 def testGitTag(self):
16 tags = git.tag().splitlines()
17 self.failUnless( 'ugit-0.0' in tags )
19 def testGitShowCdUp(self):
20 os.chdir(testutils.TEST_SCRIPT_DIR)
21 cdup = git.rev_parse(show_cdup=True)
22 self.failUnless( cdup == '../' )
24 def testGitShow(self):
25 id = '1b9742bda5d26a4f250fa64657f66ed20624a084'
26 contents = git.show(id).splitlines()
27 self.failUnless( contents[0] == '/build' )
30 if __name__ == '__main__':
31 unittest.main()