Separate the test using protocol.checkSocksIP() and skip it on python3

Closes: #1792
This commit is contained in:
Dmitri Bogomolov 2021-07-27 00:58:21 +03:00
parent 06643bbbf3
commit 3bd3f8eda2
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13

View File

@ -2,6 +2,7 @@
Tests for common protocol functions Tests for common protocol functions
""" """
import sys
import unittest import unittest
from pybitmessage import protocol, state from pybitmessage import protocol, state
@ -67,6 +68,10 @@ class TestProtocol(unittest.TestCase):
self.assertFalse(protocol.checkIPAddress(globalhost, True)) self.assertFalse(protocol.checkIPAddress(globalhost, True))
self.assertEqual(protocol.checkIPAddress(globalhost), '8.8.8.8') self.assertEqual(protocol.checkIPAddress(globalhost), '8.8.8.8')
@unittest.skipIf(
sys.hexversion >= 0x3000000, 'this is still not working with python3')
def test_check_local_socks(self):
"""The SOCKS part of the local check"""
self.assertTrue( self.assertTrue(
not protocol.checkSocksIP('127.0.0.1') not protocol.checkSocksIP('127.0.0.1')
or state.socksIP) or state.socksIP)