Refactoring crypto base changes #1806

Merged
g1itch merged 14 commits from crypto-sort into v0.6 2021-08-17 15:07:33 +02:00
Showing only changes of commit 3bd3f8eda2 - Show all commits

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)