summaryrefslogtreecommitdiffstats
path: root/tests/test_git_command.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_git_command.py')
-rw-r--r--tests/test_git_command.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_git_command.py b/tests/test_git_command.py
index 928eb402..4d65d3ce 100644
--- a/tests/test_git_command.py
+++ b/tests/test_git_command.py
@@ -18,6 +18,7 @@
18 18
19from __future__ import print_function 19from __future__ import print_function
20 20
21import re
21import unittest 22import unittest
22 23
23import git_command 24import git_command
@@ -47,3 +48,15 @@ class GitCallUnitTest(unittest.TestCase):
47 self.assertLess(ver, (9999, 9999, 9999)) 48 self.assertLess(ver, (9999, 9999, 9999))
48 49
49 self.assertNotEqual('', ver.full) 50 self.assertNotEqual('', ver.full)
51
52
53class RepoUserAgentUnitTest(unittest.TestCase):
54 """Tests the RepoUserAgent function."""
55
56 def test_smoke(self):
57 """Make sure it returns something useful."""
58 ua = git_command.RepoUserAgent()
59 # We can't dive too deep because of OS/tool differences, but we can check
60 # the general form.
61 m = re.match(r'^git-repo/[^ ]+ ([^ ]+) git/[^ ]+ Python/[0-9.]+', ua)
62 self.assertIsNotNone(m)