Beispiel #1
0
 def test_get_host_by_ansible_host(self):
     host = Host(name='test1', ansible_host='test2')
     api = NetworkRunner()
     api.add_host(host)
     ret = api.has_host('test2')
     self.assertTrue(ret)
Beispiel #2
0
 def test_get_host_fail(self):
     host = Host(name='test1')
     api = NetworkRunner()
     api.add_host(host)
     ret = api.has_host('test')
     self.assertFalse(ret)