Exemplo n.º 1
0
 def test_long_hostname_matches(self):
     socket = FakeSocket('foo.example.org')
     assert backends.needs_ssh('foo.example.org', socket) is False
Exemplo n.º 2
0
 def test_fqdn_hostname_matches_short_hostname(self):
     socket = FakeSocket('foo', getfqdn='foo.example.org')
     assert backends.needs_ssh('foo.example.org', socket) is False
Exemplo n.º 3
0
 def test_local_hostname(self, hostname):
     assert backends.needs_ssh(hostname) is False
Exemplo n.º 4
0
 def test_hostname_does_not_match(self):
     socket = FakeSocket('foo')
     assert backends.needs_ssh('meh', socket) is True
Exemplo n.º 5
0
 def test_local_hostname(self, hostname):
     assert backends.needs_ssh(hostname) is False
Exemplo n.º 6
0
 def test_fqdn_hostname_matches_short_hostname(self):
     socket = FakeSocket('foo', getfqdn='foo.example.org')
     assert backends.needs_ssh('foo.example.org', socket) is False
Exemplo n.º 7
0
 def test_hostname_does_not_match(self):
     socket = FakeSocket('foo')
     assert backends.needs_ssh('meh', socket) is True
Exemplo n.º 8
0
 def test_long_hostname_matches(self):
     socket = FakeSocket('foo.example.org')
     assert backends.needs_ssh('foo.example.org', socket) is False