diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_git_command.py | 13 |
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 | ||
19 | from __future__ import print_function | 19 | from __future__ import print_function |
20 | 20 | ||
21 | import re | ||
21 | import unittest | 22 | import unittest |
22 | 23 | ||
23 | import git_command | 24 | import 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 | |||
53 | class 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) | ||