def test_get_hostname(self): ''' Test for Get hostname ''' with patch.object(network.socket, 'gethostname', return_value='A'): self.assertEqual(network.get_hostname(), 'A')
def test_get_hostname(self): """ Test for Get hostname """ with patch.object(socket, "gethostname", return_value="A"): self.assertEqual(network.get_hostname(), "A")