Example #1
0
 def test_is_loopback(self):
     """
     Test for Check if the given IP address is a loopback address
     """
     with patch.object(ipaddress.IPv4Address, "is_loopback", return_value=True):
         self.assertTrue(network.is_loopback("127.0.0.1"))
     with patch.object(ipaddress.IPv6Address, "is_loopback", return_value=True):
         self.assertTrue(network.is_loopback("::1"))
Example #2
0
 def test_is_loopback(self):
     '''
     Test for Check if the given IP address is a loopback address
     '''
     with patch.object(ipaddress.IPv4Address, 'is_loopback',
                       return_value=True):
         self.assertTrue(network.is_loopback('127.0.0.1'))
     with patch.object(ipaddress.IPv6Address, 'is_loopback',
                       return_value=True):
         self.assertTrue(network.is_loopback('::1'))
Example #3
0
 def test_is_loopback(self):
     '''
     Test for Check if the given IP address is a loopback address
     '''
     with patch.object(salt.ext.ipaddress.IPv4Address, 'is_loopback',
                       return_value=True):
         self.assertTrue(network.is_loopback('127.0.0.1'))
     with patch.object(salt.ext.ipaddress.IPv6Address, 'is_loopback',
                       return_value=True):
         self.assertTrue(network.is_loopback('::1'))