def test_system_with_broken_ipv6(self, socket_mock): socket_mock.side_effect = IOError() self.assertFalse(network._try_ipv6_socket())
def test_with_working_ipv6(self, socket_mock): socket_mock.return_value = mock.Mock() self.assertTrue(network._try_ipv6_socket())
def test_system_that_claims_no_ipv6_support(self): self.assertFalse(network._try_ipv6_socket())