示例#1
0
 def test_system_with_broken_ipv6(self, socket_mock):
     socket_mock.side_effect = IOError()
     self.assertFalse(network._try_ipv6_socket())
示例#2
0
 def test_with_working_ipv6(self, socket_mock):
     socket_mock.return_value = mock.Mock()
     self.assertTrue(network._try_ipv6_socket())
示例#3
0
 def test_system_that_claims_no_ipv6_support(self):
     self.assertFalse(network._try_ipv6_socket())