Skip to content

Commit 62d7c6c

Browse files
committed
Add more checks into the TestProtocol.test_check_local()
1 parent b43481b commit 62d7c6c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/tests/test_protocol.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ def test_check_local(self):
3131
protocol.checkIPAddress(protocol.encodeHost('127.0.0.1'), True))
3232
self.assertTrue(
3333
protocol.checkIPAddress(protocol.encodeHost('192.168.0.1'), True))
34+
self.assertTrue(
35+
protocol.checkIPAddress(protocol.encodeHost('10.42.43.1'), True))
36+
self.assertTrue(
37+
protocol.checkIPAddress(protocol.encodeHost('172.31.255.2'), True))
38+
39+
globalhost = protocol.encodeHost('8.8.8.8')
40+
self.assertFalse(protocol.checkIPAddress(globalhost, True))
41+
self.assertEqual(protocol.checkIPAddress(globalhost), '8.8.8.8')
3442

3543
self.assertTrue(
3644
not protocol.checkSocksIP('127.0.0.1')

0 commit comments

Comments
 (0)