Remove references to legacy PyXAPI socket_ext for recvmsg

socket.recvmsg has been in Python since version 3.3 and we don't
support anything older then 3.6 the server side.
This commit is contained in:
Brian May
2021-11-11 07:57:42 +11:00
parent fca9bd6478
commit b896a4b7f3
5 changed files with 54 additions and 166 deletions

View File

@ -6,8 +6,7 @@ from unittest.mock import Mock, patch, call
from sshuttle.methods import get_method
@patch("sshuttle.methods.tproxy.recvmsg")
def test_get_supported_features_recvmsg(mock_recvmsg):
def test_get_supported_features():
method = get_method('tproxy')
features = method.get_supported_features()
assert features.ipv6
@ -15,15 +14,6 @@ def test_get_supported_features_recvmsg(mock_recvmsg):
assert features.dns
@patch("sshuttle.methods.tproxy.recvmsg", None)
def test_get_supported_features_norecvmsg():
method = get_method('tproxy')
features = method.get_supported_features()
assert features.ipv6
assert not features.udp
assert not features.dns
def test_get_tcp_dstip():
sock = Mock()
sock.getsockname.return_value = ('127.0.0.1', 1024)