Exemplo n.º 1
0
 def testHostname(self):
     expected = 'test.host.lan'
     expected_ip = socket.gethostbyname(socket.gethostname())
     self.assertEqual(self.get_local('desc').hostname, expected)
     agent = self.get_local('agent')
     self.assertEqual(agent.get_hostname(), expected)
     self.assertEqual(agent.get_ip(), expected_ip)
Exemplo n.º 2
0
 def testHostname(self):
     expected = 'test.host.lan_1'
     hostname = socket.gethostname()
     expected_ip = socket.gethostbyname(hostname)
     agent = self.get_local('agent')
     self.assertEqual(agent.get_hostname(), expected)
     self.assertEqual(agent.get_ip(), expected_ip)
Exemplo n.º 3
0
 def testHostname(self):
     expected = "test.host.lan_1"
     expected_ip = socket.gethostbyname(socket.gethostname())
     agent = self.get_local("agent")
     self.assertEqual(agent.get_hostname(), expected)
     self.assertEqual(agent.get_ip(), expected_ip)