Esempio n. 1
0
 def test_fqdn_hostname_matches_short_hostname(self):
     socket = FakeSocket('foo', getfqdn='foo.example.org')
     assert connection.needs_ssh('foo.example.org', socket) is False
Esempio n. 2
0
 def test_hostname_does_not_match(self):
     socket = FakeSocket('foo')
     assert connection.needs_ssh('meh', socket) is True
Esempio n. 3
0
 def test_long_hostname_matches(self):
     socket = FakeSocket('foo.example.org')
     assert connection.needs_ssh('foo.example.org', socket) is False
Esempio n. 4
0
 def test_fqdn_hostname_matches_short_hostname(self):
     socket = FakeSocket('foo', getfqdn='foo.example.org')
     assert connection.needs_ssh('foo.example.org', socket) is False
Esempio n. 5
0
 def test_hostname_does_not_match(self):
     socket = FakeSocket('foo')
     assert connection.needs_ssh('meh', socket) is True
Esempio n. 6
0
 def test_long_hostname_matches(self):
     socket = FakeSocket('foo.example.org')
     assert connection.needs_ssh('foo.example.org', socket) is False