summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_git_command.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/test_git_command.py b/tests/test_git_command.py
index 912a9dbe..76c092f4 100644
--- a/tests/test_git_command.py
+++ b/tests/test_git_command.py
@@ -29,8 +29,8 @@ import wrapper
29class SSHUnitTest(unittest.TestCase): 29class SSHUnitTest(unittest.TestCase):
30 """Tests the ssh functions.""" 30 """Tests the ssh functions."""
31 31
32 def test_ssh_version(self): 32 def test_parse_ssh_version(self):
33 """Check ssh_version() handling.""" 33 """Check parse_ssh_version() handling."""
34 ver = git_command._parse_ssh_version('Unknown\n') 34 ver = git_command._parse_ssh_version('Unknown\n')
35 self.assertEqual(ver, ()) 35 self.assertEqual(ver, ())
36 ver = git_command._parse_ssh_version('OpenSSH_1.0\n') 36 ver = git_command._parse_ssh_version('OpenSSH_1.0\n')
@@ -40,6 +40,11 @@ class SSHUnitTest(unittest.TestCase):
40 ver = git_command._parse_ssh_version('OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017\n') 40 ver = git_command._parse_ssh_version('OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017\n')
41 self.assertEqual(ver, (7, 6)) 41 self.assertEqual(ver, (7, 6))
42 42
43 def test_ssh_version(self):
44 """Check ssh_version() handling."""
45 with mock.patch('git_command._run_ssh_version', return_value='OpenSSH_1.2\n'):
46 self.assertEqual(git_command.ssh_version(), (1, 2))
47
43 def test_ssh_sock(self): 48 def test_ssh_sock(self):
44 """Check ssh_sock() function.""" 49 """Check ssh_sock() function."""
45 with mock.patch('tempfile.mkdtemp', return_value='/tmp/foo'): 50 with mock.patch('tempfile.mkdtemp', return_value='/tmp/foo'):