@mock.patch('six.PY2')
    def test_is_local_address_works_with_python3(self, is_python2_mock):
        is_python2_mock.return_value = False
        self.assertTrue(is_local_address(u'127.0.0.1'))
        self.assertTrue(is_local_address('127.0.0.1'))
        self.assertFalse(is_local_address('126.0.0.10'))
Test is_local_address method works for python3.
dataset/ETHPy150Open uber/mutornadomon/tests/test_net.py/TestIsLocalAddress.test_is_local_address_works_with_python3