diff options
author | Alex Chavkin <alexlchavkin@gmail.com> | 2023-02-12 12:37:13 -0500 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2023-02-16 16:59:36 -0500 |
commit | 4eb5756d7cf6e5f01fc0afdde210c413851cbf4c (patch) | |
tree | 2b2a5616d3d29d7efc9b0c6f0c9ffa4f83f419ac /tests | |
parent | dbde087c00d086216301d99591fe5d4f7d7b2bbb (diff) |
Update tests for #2173
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_hostkeys.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/test_hostkeys.py b/tests/test_hostkeys.py index ebcc40f5..f11f8523 100644 --- a/tests/test_hostkeys.py +++ b/tests/test_hostkeys.py @@ -38,6 +38,18 @@ BGQ3GQ/Fc7SX6gkpXkwcZryoi4kNFhHu5LvHcZPdxXV1D+uTMfGS1eyd2Yz/DoNWXNAl8TI0cAsW\ 5ymME3bQ4J/k1IKxCtz/bAlAqFgKoc+EolMziDYqWIATtW0rYTJvzGAzTmMj80/QpsFH+Pc2M= """ +test_hosts_file_tabs = """\ +secure.example.com\tssh-rsa\tAAAAB3NzaC1yc2EAAAABIwAAAIEA1PD6U2/TVxET6lkpKhOk5r\ +9q/kAYG6sP9f5zuUYP8i7FOFp/6ncCEbbtg/lB+A3iidyxoSWl+9jtoyyDOOVX4UIDV9G11Ml8om3\ +D+jrpI9cycZHqilK0HmxDeCuxbwyMuaCygU9gS2qoRvNLWZk70OpIKSSpBo0Wl3/XUmz9uhc= +happy.example.com\tssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEA8bP1ZA7DCZDB9J0s50l31M\ +BGQ3GQ/Fc7SX6gkpXkwcZryoi4kNFhHu5LvHcZPdxXV1D+uTMfGS1eyd2Yz/DoNWXNAl8TI0cAsW\ +5ymME3bQ4J/k1IKxCtz/bAlAqFgKoc+EolMziDYqWIATtW0rYTJvzGAzTmMj80/QpsFH+Pc2M= +doublespace.example.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEA1PD6U2/TVxET6lkp\ +KhOk5r9q/kAYG6sP9f5zuUYP8i7FOFp/6ncCEbbtg/lB+A3iidyxoSWl+9jtoyyDOOVX4UIDV9G11M\ +l8om3D+jrpI9cycZHqilK0HmxDeCuxbwyMuaCygU9gS2qoRvNLWZk70OpIKSSpBo0Wl3/XUmz8BtZ= +""" + keyblob = b"""\ AAAAB3NzaC1yc2EAAAABIwAAAIEA8bP1ZA7DCZDB9J0s50l31MBGQ3GQ/Fc7SX6gkpXkwcZryoi4k\ NFhHu5LvHcZPdxXV1D+uTMfGS1eyd2Yz/DoNWXNAl8TI0cAsW5ymME3bQ4J/k1IKxCtz/bAlAqFgK\ @@ -53,7 +65,6 @@ Ngw3qIch/WgRmMHy4kBq1SsXMjQCte1So6HBMvBPIW5SiMTmjCfZZiw4AYHK+B/JaOwaG9yRg2Ejg\ 1kKBWApqpH1ve9XDQYN8zgxM4b16L21kpoWQnZtXrY3GZ4/it9kUgyB7+NwacIBlXa8cMDL7Q/69o\ 0d54U0X/NeX5QxuYR6OMJlrkQB7oiW/P/1mwjQgE=""" - class HostKeysTest(unittest.TestCase): def setUp(self): with open("hostfile.temp", "w") as f: @@ -147,3 +158,8 @@ class HostKeysTest(unittest.TestCase): pass # Good else: assert False, "Key was not deleted from Entry on delitem!" + +class HostKeysTabsTest(HostKeysTest): + def setUp(self): + with open("hostfile.temp", "w") as f: + f.write(test_hosts_file_tabs) |