Port txsocksx to Python3 #2999

Closed
opened 2019-03-13 18:37:14 +00:00 by pythonhacker · 12 comments
pythonhacker commented 2019-03-13 18:37:14 +00:00
Owner

txsocksx - https://pypi.org/project/txsocksx/ is a dependency for foolscap and it is Python2 only.

The following issue on foolscap project already references this - https://github.com/warner/foolscap/issues/37 but it is a bit old and not updated since July 2017.

The ticket #2998 has a downstream dependency on this ticket.

txsocksx - <https://pypi.org/project/txsocksx/> is a dependency for foolscap and it is Python2 only. The following issue on foolscap project already references this - <https://github.com/warner/foolscap/issues/37> but it is a bit old and not updated since July 2017. The ticket #2998 has a downstream dependency on this ticket.
tahoe-lafs added the
code
normal
task
1.12.1
labels 2019-03-13 18:37:14 +00:00
tahoe-lafs added this to the undecided milestone 2019-03-13 18:37:14 +00:00
pythonhacker commented 2019-03-13 19:41:34 +00:00
Author
Owner

Started work on this - as a first step installed txsocksx in a Python3.5 virtual environment and got setup.py to work. Tests fail as of now.

Started work on this - as a first step installed txsocksx in a Python3.5 virtual environment and got setup.py to work. Tests fail as of now.
pythonhacker commented 2019-03-18 20:01:58 +00:00
Author
Owner

The tests fail majestically.


anand@anand-HP-Pavilion-Laptop-15-cc1xx:~/projects/anvetsu/tahoe/txsocksx/txsocksx/test\ {2019-03-18 19:40:11}
$ txsocksx_venv
(txsocksx) anand@anand-HP-Pavilion-Laptop-15-cc1xx:~/projects/anvetsu/tahoe/txsocksx/txsocksx/test\ {2019-03-18 19:40:25}
$ pytest
================================================= test session starts =================================================
platform linux -- Python 3.5.6, pytest-4.3.1, py-1.8.0, pluggy-0.9.0
rootdir: /home/anand/projects/anvetsu/tahoe/txsocksx, inifile:
collected 86 items                                                                                                    

test_client.py FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF.FFFFFFFFFFFFFFFFFF.F.FFFFF                               [ 76%]
test_grammar.py .FFFF....F                                                                                      [ 88%]
test_http.py FFFFF                                                                                              [ 94%]
test_tls.py ...FF                                                                                               [100%]

====================================================== FAILURES =======================================================
_________________________________________ TestSOCKS5Client.test_authAddition __________________________________________

self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_authAddition>

    def test_authAddition(self):
        fac, proto = self.makeProto(
>           _protoClass=AdditionAuthSOCKS5Client, methods={'A': ('x', 'y')})

test_client.py:222: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:111: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:126: in prepareParsing
    self.sender.sendAuthMethods(self.factory.methods)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5Sender object at 0x7f9c97eefdd8>, methods = {'A': ('x', 'y')}

    def sendAuthMethods(self, methods):
        self.transport.write(
>           struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods))
E       TypeError: can't concat str to bytes

../client.py:88: TypeError
___________________________________________ TestSOCKS5Client.test_buffering ___________________________________________

self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_buffering>

    def test_buffering(self):
>       fac, proto = self.makeProto()

test_client.py:192: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:111: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:126: in prepareParsing
    self.sender.sendAuthMethods(self.factory.methods)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5Sender object at 0x7f9c986cf5c0>, methods = {'\x00': ()}

    def sendAuthMethods(self, methods):
        self.transport.write(
>           struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods))
E       TypeError: can't concat str to bytes

../client.py:88: TypeError
________________________________ TestSOCKS5Client.test_connectionLostAfterNegotiation _________________________________

self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_connectionLostAfterNegotiation>

    def test_connectionLostAfterNegotiation(self):
>       fac, proto = self.makeProto()

test_client.py:209: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:111: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:126: in prepareParsing
    self.sender.sendAuthMethods(self.factory.methods)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5Sender object at 0x7f9c9765dda0>, methods = {'\x00': ()}

    def sendAuthMethods(self, methods):
        self.transport.write(
>           struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods))
E       TypeError: can't concat str to bytes

../client.py:88: TypeError
______________________________________ TestSOCKS5Client.test_connectionLostEarly ______________________________________

self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_connectionLostEarly>

    def test_connectionLostEarly(self):
        wholeRequest = '\x05\x00\x05\x00\x00\x01444422'
>       for e in xrange(len(wholeRequest)):
E       NameError: name 'xrange' is not defined

test_client.py:199: NameError
_______________________________________ TestSOCKS5Client.test_connectionRequest _______________________________________

self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_connectionRequest>

    def test_connectionRequest(self):
>       fac, proto = self.makeProto('host', 0x47)

test_client.py:155: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:111: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:126: in prepareParsing
    self.sender.sendAuthMethods(self.factory.methods)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5Sender object at 0x7f9c98583550>, methods = {'\x00': ()}

    def sendAuthMethods(self, methods):
        self.transport.write(
>           struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods))
E       TypeError: can't concat str to bytes

../client.py:88: TypeError
____________________________________ TestSOCKS5Client.test_connectionRequestError _____________________________________

self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_connectionRequestError>

    def test_connectionRequestError(self):
>       fac, proto = self.makeProto()

test_client.py:185: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:111: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:126: in prepareParsing
    self.sender.sendAuthMethods(self.factory.methods)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5Sender object at 0x7f9c98ad1400>, methods = {'\x00': ()}

    def sendAuthMethods(self, methods):
        self.transport.write(
>           struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods))
E       TypeError: can't concat str to bytes

../client.py:88: TypeError
________________________________________ TestSOCKS5Client.test_dataSentByPeer _________________________________________

self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_dataSentByPeer>

    def test_dataSentByPeer(self):
>       fac, proto = self.makeProto()

test_client.py:233: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:111: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:126: in prepareParsing
    self.sender.sendAuthMethods(self.factory.methods)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5Sender object at 0x7f9c989520f0>, methods = {'\x00': ()}

    def sendAuthMethods(self, methods):
        self.transport.write(
>           struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods))
E       TypeError: can't concat str to bytes

../client.py:88: TypeError
_____________________________________ TestSOCKS5Client.test_failedMethodSelection _____________________________________

self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_failedMethodSelection>

    def test_failedMethodSelection(self):
>       fac, proto = self.makeProto()

test_client.py:125: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:111: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:126: in prepareParsing
    self.sender.sendAuthMethods(self.factory.methods)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5Sender object at 0x7f9c98834a90>, methods = {'\x00': ()}

    def sendAuthMethods(self, methods):
        self.transport.write(
>           struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods))
E       TypeError: can't concat str to bytes

../client.py:88: TypeError
___________________________________ TestSOCKS5Client.test_handshakeEatsEnoughBytes ____________________________________

self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_handshakeEatsEnoughBytes>

    def test_handshakeEatsEnoughBytes(self):
>       fac, proto = self.makeProto()

test_client.py:168: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:111: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:126: in prepareParsing
    self.sender.sendAuthMethods(self.factory.methods)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5Sender object at 0x7f9c98691320>, methods = {'\x00': ()}

    def sendAuthMethods(self, methods):
        self.transport.write(
>           struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods))
E       TypeError: can't concat str to bytes

../client.py:88: TypeError
_______________________________________ TestSOCKS5Client.test_initialHandshake ________________________________________

self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_initialHandshake>

    def test_initialHandshake(self):
>       fac, proto = self.makeProto()

test_client.py:115: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:111: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:126: in prepareParsing
    self.sender.sendAuthMethods(self.factory.methods)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5Sender object at 0x7f9c98ad1470>, methods = {'\x00': ()}

    def sendAuthMethods(self, methods):
        self.transport.write(
>           struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods))
E       TypeError: can't concat str to bytes

../client.py:88: TypeError
___________________________________________ TestSOCKS5Client.test_loginAuth ___________________________________________

self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_loginAuth>

    def test_loginAuth(self):
>       fac, proto = self.makeProto(methods={c.AUTH_LOGIN: ('spam', 'eggs')})

test_client.py:134: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:111: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:126: in prepareParsing
    self.sender.sendAuthMethods(self.factory.methods)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5Sender object at 0x7f9c982bd1d0>, methods = {'\x02': ('spam', 'eggs')}

    def sendAuthMethods(self, methods):
        self.transport.write(
>           struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods))
E       TypeError: can't concat str to bytes

../client.py:88: TypeError
_______________________________________ TestSOCKS5Client.test_loginAuthAccepted _______________________________________

self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_loginAuthAccepted>

    def test_loginAuthAccepted(self):
>       fac, proto = self.makeProto(methods={c.AUTH_LOGIN: ('spam', 'eggs')})

test_client.py:140: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:111: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:126: in prepareParsing
    self.sender.sendAuthMethods(self.factory.methods)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5Sender object at 0x7f9c985b03c8>, methods = {'\x02': ('spam', 'eggs')}

    def sendAuthMethods(self, methods):
        self.transport.write(
>           struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods))
E       TypeError: can't concat str to bytes

../client.py:88: TypeError
________________________________________ TestSOCKS5Client.test_loginAuthFailed ________________________________________

self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_loginAuthFailed>

    def test_loginAuthFailed(self):
>       fac, proto = self.makeProto(methods={c.AUTH_LOGIN: ('spam', 'eggs')})

test_client.py:147: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:111: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:126: in prepareParsing
    self.sender.sendAuthMethods(self.factory.methods)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5Sender object at 0x7f9c986814e0>, methods = {'\x02': ('spam', 'eggs')}

    def sendAuthMethods(self, methods):
        self.transport.write(
>           struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods))
E       TypeError: can't concat str to bytes

../client.py:88: TypeError
_______________________________________ TestSOCKS5Client.test_protocolSwitching _______________________________________

self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_protocolSwitching>

    def test_protocolSwitching(self):
>       fac, proto = self.makeProto()

test_client.py:245: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:111: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:126: in prepareParsing
    self.sender.sendAuthMethods(self.factory.methods)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5Sender object at 0x7f9c97e56748>, methods = {'\x00': ()}

    def sendAuthMethods(self, methods):
        self.transport.write(
>           struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods))
E       TypeError: can't concat str to bytes

../client.py:88: TypeError
__________________________ TestSOCKS5Client.test_protocolSwitchingWithoutAProtocolAttribute ___________________________

self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_protocolSwitchingWithoutAProtocolAttribute>

    def test_protocolSwitchingWithoutAProtocolAttribute(self):
>       fac, proto = self.makeProto()

test_client.py:240: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:111: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:126: in prepareParsing
    self.sender.sendAuthMethods(self.factory.methods)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5Sender object at 0x7f9c98af0d30>, methods = {'\x00': ()}

    def sendAuthMethods(self, methods):
        self.transport.write(
>           struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods))
E       TypeError: can't concat str to bytes

../client.py:88: TypeError
___________________________________________ TestSOCKS4Client.test_buffering ___________________________________________

self = <txsocksx.test.test_client.TestSOCKS4Client testMethod=test_buffering>

    def test_buffering(self):
>       fac, proto = self.makeProto()

test_client.py:291: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:259: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:272: in prepareParsing
    self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS4Sender object at 0x7f9c9815a2e8>, host = '\x00\x00\x00\x01', port = 0, user = ''

    def sendRequest(self, host, port, user):
        data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port)
        try:
            host = socket.inet_pton(socket.AF_INET, host)
        except socket.error:
            host, suffix = '\0\0\0\1', host + '\0'
        else:
            suffix = ''
>       self.transport.write(data + host + user + '\0' + suffix)
E       TypeError: can't concat str to bytes

../client.py:260: TypeError
________________________________ TestSOCKS4Client.test_connectionLostAfterNegotiation _________________________________

self = <txsocksx.test.test_client.TestSOCKS4Client testMethod=test_connectionLostAfterNegotiation>

    def test_connectionLostAfterNegotiation(self):
>       fac, proto = self.makeProto()

test_client.py:308: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:259: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:272: in prepareParsing
    self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS4Sender object at 0x7f9c9765d6a0>, host = '\x00\x00\x00\x01', port = 0, user = ''

    def sendRequest(self, host, port, user):
        data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port)
        try:
            host = socket.inet_pton(socket.AF_INET, host)
        except socket.error:
            host, suffix = '\0\0\0\1', host + '\0'
        else:
            suffix = ''
>       self.transport.write(data + host + user + '\0' + suffix)
E       TypeError: can't concat str to bytes

../client.py:260: TypeError
__________________________ TestSOCKS4Client.test_connectionLostAfterNegotiationWithSomeBytes __________________________

self = <txsocksx.test.test_client.TestSOCKS4Client testMethod=test_connectionLostAfterNegotiationWithSomeBytes>

    def test_connectionLostAfterNegotiationWithSomeBytes(self):
>       fac, proto = self.makeProto()

test_client.py:314: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:259: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:272: in prepareParsing
    self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS4Sender object at 0x7f9c98ad1470>, host = '\x00\x00\x00\x01', port = 0, user = ''

    def sendRequest(self, host, port, user):
        data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port)
        try:
            host = socket.inet_pton(socket.AF_INET, host)
        except socket.error:
            host, suffix = '\0\0\0\1', host + '\0'
        else:
            suffix = ''
>       self.transport.write(data + host + user + '\0' + suffix)
E       TypeError: can't concat str to bytes

../client.py:260: TypeError
______________________________________ TestSOCKS4Client.test_connectionLostEarly ______________________________________

self = <txsocksx.test.test_client.TestSOCKS4Client testMethod=test_connectionLostEarly>

    def test_connectionLostEarly(self):
        wholeRequest = '\x00\x5a\x00\x00\x00\x00\x00\x00'
>       for e in xrange(len(wholeRequest)):
E       NameError: name 'xrange' is not defined

test_client.py:298: NameError
____________________________________ TestSOCKS4Client.test_connectionRequestError _____________________________________

self = <txsocksx.test.test_client.TestSOCKS4Client testMethod=test_connectionRequestError>

    def test_connectionRequestError(self):
>       fac, proto = self.makeProto()

test_client.py:284: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:259: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:272: in prepareParsing
    self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS4Sender object at 0x7f9c98b9eef0>, host = '\x00\x00\x00\x01', port = 0, user = ''

    def sendRequest(self, host, port, user):
        data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port)
        try:
            host = socket.inet_pton(socket.AF_INET, host)
        except socket.error:
            host, suffix = '\0\0\0\1', host + '\0'
        else:
            suffix = ''
>       self.transport.write(data + host + user + '\0' + suffix)
E       TypeError: can't concat str to bytes

../client.py:260: TypeError
________________________________________ TestSOCKS4Client.test_dataSentByPeer _________________________________________

self = <txsocksx.test.test_client.TestSOCKS4Client testMethod=test_dataSentByPeer>

    def test_dataSentByPeer(self):
>       fac, proto = self.makeProto()

test_client.py:321: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:259: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:272: in prepareParsing
    self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS4Sender object at 0x7f9c988a6e48>, host = '\x00\x00\x00\x01', port = 0, user = ''

    def sendRequest(self, host, port, user):
        data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port)
        try:
            host = socket.inet_pton(socket.AF_INET, host)
        except socket.error:
            host, suffix = '\0\0\0\1', host + '\0'
        else:
            suffix = ''
>       self.transport.write(data + host + user + '\0' + suffix)
E       TypeError: can't concat str to bytes

../client.py:260: TypeError
___________________________________ TestSOCKS4Client.test_handshakeEatsEnoughBytes ____________________________________

self = <txsocksx.test.test_client.TestSOCKS4Client testMethod=test_handshakeEatsEnoughBytes>

    def test_handshakeEatsEnoughBytes(self):
>       fac, proto = self.makeProto()

test_client.py:279: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:259: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:272: in prepareParsing
    self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS4Sender object at 0x7f9c98b43e48>, host = '\x00\x00\x00\x01', port = 0, user = ''

    def sendRequest(self, host, port, user):
        data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port)
        try:
            host = socket.inet_pton(socket.AF_INET, host)
        except socket.error:
            host, suffix = '\0\0\0\1', host + '\0'
        else:
            suffix = ''
>       self.transport.write(data + host + user + '\0' + suffix)
E       TypeError: can't concat str to bytes

../client.py:260: TypeError
_______________________________________ TestSOCKS4Client.test_initialHandshake ________________________________________

self = <txsocksx.test.test_client.TestSOCKS4Client testMethod=test_initialHandshake>

    def test_initialHandshake(self):
>       fac, proto = self.makeProto(host='0.0.0.0', port=0x1234)

test_client.py:263: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:259: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:272: in prepareParsing
    self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS4Sender object at 0x7f9c981af160>, host = b'\x00\x00\x00\x00', port = 4660, user = ''

    def sendRequest(self, host, port, user):
        data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port)
        try:
            host = socket.inet_pton(socket.AF_INET, host)
        except socket.error:
            host, suffix = '\0\0\0\1', host + '\0'
        else:
            suffix = ''
>       self.transport.write(data + host + user + '\0' + suffix)
E       TypeError: can't concat str to bytes

../client.py:260: TypeError
_________________________________ TestSOCKS4Client.test_initialHandshakeWithHostname __________________________________

self = <txsocksx.test.test_client.TestSOCKS4Client testMethod=test_initialHandshakeWithHostname>

    def test_initialHandshakeWithHostname(self):
>       fac, proto = self.makeProto(host='example.com', port=0x4321)

test_client.py:267: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:259: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:272: in prepareParsing
    self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS4Sender object at 0x7f9c97833a20>, host = '\x00\x00\x00\x01', port = 17185, user = ''

    def sendRequest(self, host, port, user):
        data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port)
        try:
            host = socket.inet_pton(socket.AF_INET, host)
        except socket.error:
            host, suffix = '\0\0\0\1', host + '\0'
        else:
            suffix = ''
>       self.transport.write(data + host + user + '\0' + suffix)
E       TypeError: can't concat str to bytes

../client.py:260: TypeError
___________________________________ TestSOCKS4Client.test_initialHandshakeWithUser ____________________________________

self = <txsocksx.test.test_client.TestSOCKS4Client testMethod=test_initialHandshakeWithUser>

    def test_initialHandshakeWithUser(self):
>       fac, proto = self.makeProto(host='0.0.0.0', port=0x1234, user='spam')

test_client.py:271: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:259: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:272: in prepareParsing
    self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS4Sender object at 0x7f9c98447278>, host = b'\x00\x00\x00\x00', port = 4660, user = 'spam'

    def sendRequest(self, host, port, user):
        data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port)
        try:
            host = socket.inet_pton(socket.AF_INET, host)
        except socket.error:
            host, suffix = '\0\0\0\1', host + '\0'
        else:
            suffix = ''
>       self.transport.write(data + host + user + '\0' + suffix)
E       TypeError: can't concat str to bytes

../client.py:260: TypeError
______________________________ TestSOCKS4Client.test_initialHandshakeWithUserAndHostname ______________________________

self = <txsocksx.test.test_client.TestSOCKS4Client testMethod=test_initialHandshakeWithUserAndHostname>

    def test_initialHandshakeWithUserAndHostname(self):
>       fac, proto = self.makeProto(host='spam.com', port=0x1234, user='spam')

test_client.py:275: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:259: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:272: in prepareParsing
    self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS4Sender object at 0x7f9c986cf828>, host = '\x00\x00\x00\x01', port = 4660, user = 'spam'

    def sendRequest(self, host, port, user):
        data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port)
        try:
            host = socket.inet_pton(socket.AF_INET, host)
        except socket.error:
            host, suffix = '\0\0\0\1', host + '\0'
        else:
            suffix = ''
>       self.transport.write(data + host + user + '\0' + suffix)
E       TypeError: can't concat str to bytes

../client.py:260: TypeError
_______________________________________ TestSOCKS4Client.test_protocolSwitching _______________________________________

self = <txsocksx.test.test_client.TestSOCKS4Client testMethod=test_protocolSwitching>

    def test_protocolSwitching(self):
>       fac, proto = self.makeProto()

test_client.py:333: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:259: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:272: in prepareParsing
    self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS4Sender object at 0x7f9c982ab9b0>, host = '\x00\x00\x00\x01', port = 0, user = ''

    def sendRequest(self, host, port, user):
        data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port)
        try:
            host = socket.inet_pton(socket.AF_INET, host)
        except socket.error:
            host, suffix = '\0\0\0\1', host + '\0'
        else:
            suffix = ''
>       self.transport.write(data + host + user + '\0' + suffix)
E       TypeError: can't concat str to bytes

../client.py:260: TypeError
__________________________ TestSOCKS4Client.test_protocolSwitchingWithoutAProtocolAttribute ___________________________

self = <txsocksx.test.test_client.TestSOCKS4Client testMethod=test_protocolSwitchingWithoutAProtocolAttribute>

    def test_protocolSwitchingWithoutAProtocolAttribute(self):
>       fac, proto = self.makeProto()

test_client.py:328: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:259: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:272: in prepareParsing
    self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS4Sender object at 0x7f9c985d3fd0>, host = '\x00\x00\x00\x01', port = 0, user = ''

    def sendRequest(self, host, port, user):
        data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port)
        try:
            host = socket.inet_pton(socket.AF_INET, host)
        except socket.error:
            host, suffix = '\0\0\0\1', host + '\0'
        else:
            suffix = ''
>       self.transport.write(data + host + user + '\0' + suffix)
E       TypeError: can't concat str to bytes

../client.py:260: TypeError
_________________________________ TestSOCKS5ClientFactory.test_anonymousAndLoginAuth __________________________________

self = <txsocksx.test.test_client.TestSOCKS5ClientFactory testMethod=test_anonymousAndLoginAuth>

    def test_anonymousAndLoginAuth(self):
>       fac, proto = self.makeProto('', 0, None, methods={'anonymous': (), 'login': ()})

test_client.py:399: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:358: in makeProto
    fac = self.factory(*a, **kw)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c9819c128>, host = '', port = 0, proxiedFactory = None
methods = {'anonymous': (), 'login': ()}

    def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}):
        if not methods:
            raise ValueError('no auth methods were specified')
        self.host = host
        self.port = port
        self.proxiedFactory = proxiedFactory
        self.methods = dict(
            (self.authMethodMap[method], value)
>           for method, value in methods.iteritems())
E       AttributeError: 'dict' object has no attribute 'iteritems'

../client.py:180: AttributeError
_________________________________ TestSOCKS5ClientFactory.test_buildingWrappedFactory _________________________________

self = <txsocksx.test.test_client.TestSOCKS5ClientFactory testMethod=test_buildingWrappedFactory>

    def test_buildingWrappedFactory(self):
        wrappedFac = FakeFactory()
>       fac, proto = self.makeProto('', 0, wrappedFac)

test_client.py:425: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:358: in makeProto
    fac = self.factory(*a, **kw)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c989c4cc0>, host = '', port = 0
proxiedFactory = <txsocksx.test.test_client.FakeFactory object at 0x7f9c989c4320>, methods = {'anonymous': ()}

    def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}):
        if not methods:
            raise ValueError('no auth methods were specified')
        self.host = host
        self.port = port
        self.proxiedFactory = proxiedFactory
        self.methods = dict(
            (self.authMethodMap[method], value)
>           for method, value in methods.iteritems())
E       AttributeError: 'dict' object has no attribute 'iteritems'

../client.py:180: AttributeError
______________________________________ TestSOCKS5ClientFactory.test_cancellation ______________________________________

self = <txsocksx.test.test_client.TestSOCKS5ClientFactory testMethod=test_cancellation>

    def test_cancellation(self):
>       fac, proto = self.makeProto('', 0, None)

test_client.py:366: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:358: in makeProto
    fac = self.factory(*a, **kw)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c977656a0>, host = '', port = 0, proxiedFactory = None
methods = {'anonymous': ()}

    def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}):
        if not methods:
            raise ValueError('no auth methods were specified')
        self.host = host
        self.port = port
        self.proxiedFactory = proxiedFactory
        self.methods = dict(
            (self.authMethodMap[method], value)
>           for method, value in methods.iteritems())
E       AttributeError: 'dict' object has no attribute 'iteritems'

../client.py:180: AttributeError
________________________________ TestSOCKS5ClientFactory.test_cancellationAfterFailure ________________________________

self = <txsocksx.test.test_client.TestSOCKS5ClientFactory testMethod=test_cancellationAfterFailure>

    def test_cancellationAfterFailure(self):
>       fac, proto = self.makeProto('', 0, None)

test_client.py:379: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:358: in makeProto
    fac = self.factory(*a, **kw)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c9896e0b8>, host = '', port = 0, proxiedFactory = None
methods = {'anonymous': ()}

    def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}):
        if not methods:
            raise ValueError('no auth methods were specified')
        self.host = host
        self.port = port
        self.proxiedFactory = proxiedFactory
        self.methods = dict(
            (self.authMethodMap[method], value)
>           for method, value in methods.iteritems())
E       AttributeError: 'dict' object has no attribute 'iteritems'

../client.py:180: AttributeError
_______________________________ TestSOCKS5ClientFactory.test_cancellationBeforeFailure ________________________________

self = <txsocksx.test.test_client.TestSOCKS5ClientFactory testMethod=test_cancellationBeforeFailure>

    def test_cancellationBeforeFailure(self):
>       fac, proto = self.makeProto('', 0, None)

test_client.py:372: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:358: in makeProto
    fac = self.factory(*a, **kw)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c98128940>, host = '', port = 0, proxiedFactory = None
methods = {'anonymous': ()}

    def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}):
        if not methods:
            raise ValueError('no auth methods were specified')
        self.host = host
        self.port = port
        self.proxiedFactory = proxiedFactory
        self.methods = dict(
            (self.authMethodMap[method], value)
>           for method, value in methods.iteritems())
E       AttributeError: 'dict' object has no attribute 'iteritems'

../client.py:180: AttributeError
_________________________________ TestSOCKS5ClientFactory.test_clientConnectionFailed _________________________________

self = <txsocksx.test.test_client.TestSOCKS5ClientFactory testMethod=test_clientConnectionFailed>

    def test_clientConnectionFailed(self):
>       fac, proto = self.makeProto('', 0, None)

test_client.py:386: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:358: in makeProto
    fac = self.factory(*a, **kw)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c9866e748>, host = '', port = 0, proxiedFactory = None
methods = {'anonymous': ()}

    def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}):
        if not methods:
            raise ValueError('no auth methods were specified')
        self.host = host
        self.port = port
        self.proxiedFactory = proxiedFactory
        self.methods = dict(
            (self.authMethodMap[method], value)
>           for method, value in methods.iteritems())
E       AttributeError: 'dict' object has no attribute 'iteritems'

../client.py:180: AttributeError
_____________________________________ TestSOCKS5ClientFactory.test_dataSentByPeer _____________________________________

self = <txsocksx.test.test_client.TestSOCKS5ClientFactory testMethod=test_dataSentByPeer>

    def test_dataSentByPeer(self):
        wrappedFac = FakeFactory()
>       fac, proto = self.makeProto('', 0, wrappedFac)

test_client.py:438: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:358: in makeProto
    fac = self.factory(*a, **kw)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c9809f1d0>, host = '', port = 0
proxiedFactory = <txsocksx.test.test_client.FakeFactory object at 0x7f9c9809fa90>, methods = {'anonymous': ()}

    def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}):
        if not methods:
            raise ValueError('no auth methods were specified')
        self.host = host
        self.port = port
        self.proxiedFactory = proxiedFactory
        self.methods = dict(
            (self.authMethodMap[method], value)
>           for method, value in methods.iteritems())
E       AttributeError: 'dict' object has no attribute 'iteritems'

../client.py:180: AttributeError
_____________________________________ TestSOCKS5ClientFactory.test_defaultFactory _____________________________________

self = <txsocksx.test.test_client.TestSOCKS5ClientFactory testMethod=test_defaultFactory>

    def test_defaultFactory(self):
>       fac, proto = self.makeProto('', 0, None)

test_client.py:395: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:358: in makeProto
    fac = self.factory(*a, **kw)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c988a65c0>, host = '', port = 0, proxiedFactory = None
methods = {'anonymous': ()}

    def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}):
        if not methods:
            raise ValueError('no auth methods were specified')
        self.host = host
        self.port = port
        self.proxiedFactory = proxiedFactory
        self.methods = dict(
            (self.authMethodMap[method], value)
>           for method, value in methods.iteritems())
E       AttributeError: 'dict' object has no attribute 'iteritems'

../client.py:180: AttributeError
_____________________________________ TestSOCKS5ClientFactory.test_justLoginAuth ______________________________________

self = <txsocksx.test.test_client.TestSOCKS5ClientFactory testMethod=test_justLoginAuth>

    def test_justLoginAuth(self):
>       fac, proto = self.makeProto('', 0, None, methods={'login': ()})

test_client.py:403: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:358: in makeProto
    fac = self.factory(*a, **kw)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c98355898>, host = '', port = 0, proxiedFactory = None
methods = {'login': ()}

    def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}):
        if not methods:
            raise ValueError('no auth methods were specified')
        self.host = host
        self.port = port
        self.proxiedFactory = proxiedFactory
        self.methods = dict(
            (self.authMethodMap[method], value)
>           for method, value in methods.iteritems())
E       AttributeError: 'dict' object has no attribute 'iteritems'

../client.py:180: AttributeError
_______________________________________ TestSOCKS5ClientFactory.test_loginAuth ________________________________________

self = <txsocksx.test.test_client.TestSOCKS5ClientFactory testMethod=test_loginAuth>

    def test_loginAuth(self):
>       fac, proto = self.makeProto('', 0, None, methods={'login': ('spam', 'eggs')})

test_client.py:411: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:358: in makeProto
    fac = self.factory(*a, **kw)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c987a1780>, host = '', port = 0, proxiedFactory = None
methods = {'login': ('spam', 'eggs')}

    def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}):
        if not methods:
            raise ValueError('no auth methods were specified')
        self.host = host
        self.port = port
        self.proxiedFactory = proxiedFactory
        self.methods = dict(
            (self.authMethodMap[method], value)
>           for method, value in methods.iteritems())
E       AttributeError: 'dict' object has no attribute 'iteritems'

../client.py:180: AttributeError
___________________________________ TestSOCKS5ClientFactory.test_loginAuthAccepted ____________________________________

self = <txsocksx.test.test_client.TestSOCKS5ClientFactory testMethod=test_loginAuthAccepted>

    def test_loginAuthAccepted(self):
>       fac, proto = self.makeProto('', 0, None, methods={'login': ('spam', 'eggs')})

test_client.py:417: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:358: in makeProto
    fac = self.factory(*a, **kw)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c987bddd8>, host = '', port = 0, proxiedFactory = None
methods = {'login': ('spam', 'eggs')}

    def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}):
        if not methods:
            raise ValueError('no auth methods were specified')
        self.host = host
        self.port = port
        self.proxiedFactory = proxiedFactory
        self.methods = dict(
            (self.authMethodMap[method], value)
>           for method, value in methods.iteritems())
E       AttributeError: 'dict' object has no attribute 'iteritems'

../client.py:180: AttributeError
______________________________ TestSOCKS5ClientFactory.test_noProtocolFromWrappedFactory ______________________________

self = <txsocksx.test.test_client.TestSOCKS5ClientFactory testMethod=test_noProtocolFromWrappedFactory>

    def test_noProtocolFromWrappedFactory(self):
        wrappedFac = FakeFactory(returnNoProtocol=True)
>       fac, proto = self.makeProto('', 0, wrappedFac)

test_client.py:431: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:358: in makeProto
    fac = self.factory(*a, **kw)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c985832b0>, host = '', port = 0
proxiedFactory = <txsocksx.test.test_client.FakeFactory object at 0x7f9c985830f0>, methods = {'anonymous': ()}

    def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}):
        if not methods:
            raise ValueError('no auth methods were specified')
        self.host = host
        self.port = port
        self.proxiedFactory = proxiedFactory
        self.methods = dict(
            (self.authMethodMap[method], value)
>           for method, value in methods.iteritems())
E       AttributeError: 'dict' object has no attribute 'iteritems'

../client.py:180: AttributeError
_________________________________ TestSOCKS4ClientFactory.test_buildingWrappedFactory _________________________________

self = <txsocksx.test.test_client.TestSOCKS4ClientFactory testMethod=test_buildingWrappedFactory>

    def test_buildingWrappedFactory(self):
        wrappedFac = FakeFactory()
>       fac, proto = self.makeProto('127.0.0.1', 0, wrappedFac)

test_client.py:462: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:362: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:272: in prepareParsing
    self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS4Sender object at 0x7f9c98615400>, host = b'\x7f\x00\x00\x01', port = 0, user = ''

    def sendRequest(self, host, port, user):
        data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port)
        try:
            host = socket.inet_pton(socket.AF_INET, host)
        except socket.error:
            host, suffix = '\0\0\0\1', host + '\0'
        else:
            suffix = ''
>       self.transport.write(data + host + user + '\0' + suffix)
E       TypeError: can't concat str to bytes

../client.py:260: TypeError
______________________________________ TestSOCKS4ClientFactory.test_cancellation ______________________________________

self = <txsocksx.test.test_client.TestSOCKS4ClientFactory testMethod=test_cancellation>

    def test_cancellation(self):
>       fac, proto = self.makeProto('', 0, None)

test_client.py:366: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:362: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:272: in prepareParsing
    self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS4Sender object at 0x7f9c97e56828>, host = '\x00\x00\x00\x01', port = 0, user = ''

    def sendRequest(self, host, port, user):
        data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port)
        try:
            host = socket.inet_pton(socket.AF_INET, host)
        except socket.error:
            host, suffix = '\0\0\0\1', host + '\0'
        else:
            suffix = ''
>       self.transport.write(data + host + user + '\0' + suffix)
E       TypeError: can't concat str to bytes

../client.py:260: TypeError
________________________________ TestSOCKS4ClientFactory.test_cancellationAfterFailure ________________________________

self = <txsocksx.test.test_client.TestSOCKS4ClientFactory testMethod=test_cancellationAfterFailure>

    def test_cancellationAfterFailure(self):
>       fac, proto = self.makeProto('', 0, None)

test_client.py:379: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:362: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:272: in prepareParsing
    self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS4Sender object at 0x7f9c98553518>, host = '\x00\x00\x00\x01', port = 0, user = ''

    def sendRequest(self, host, port, user):
        data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port)
        try:
            host = socket.inet_pton(socket.AF_INET, host)
        except socket.error:
            host, suffix = '\0\0\0\1', host + '\0'
        else:
            suffix = ''
>       self.transport.write(data + host + user + '\0' + suffix)
E       TypeError: can't concat str to bytes

../client.py:260: TypeError
_______________________________ TestSOCKS4ClientFactory.test_cancellationBeforeFailure ________________________________

self = <txsocksx.test.test_client.TestSOCKS4ClientFactory testMethod=test_cancellationBeforeFailure>

    def test_cancellationBeforeFailure(self):
>       fac, proto = self.makeProto('', 0, None)

test_client.py:372: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:362: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:272: in prepareParsing
    self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS4Sender object at 0x7f9c98b9eda0>, host = '\x00\x00\x00\x01', port = 0, user = ''

    def sendRequest(self, host, port, user):
        data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port)
        try:
            host = socket.inet_pton(socket.AF_INET, host)
        except socket.error:
            host, suffix = '\0\0\0\1', host + '\0'
        else:
            suffix = ''
>       self.transport.write(data + host + user + '\0' + suffix)
E       TypeError: can't concat str to bytes

../client.py:260: TypeError
_________________________________ TestSOCKS4ClientFactory.test_clientConnectionFailed _________________________________

self = <txsocksx.test.test_client.TestSOCKS4ClientFactory testMethod=test_clientConnectionFailed>

    def test_clientConnectionFailed(self):
>       fac, proto = self.makeProto('', 0, None)

test_client.py:386: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:362: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:272: in prepareParsing
    self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS4Sender object at 0x7f9c976d8278>, host = '\x00\x00\x00\x01', port = 0, user = ''

    def sendRequest(self, host, port, user):
        data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port)
        try:
            host = socket.inet_pton(socket.AF_INET, host)
        except socket.error:
            host, suffix = '\0\0\0\1', host + '\0'
        else:
            suffix = ''
>       self.transport.write(data + host + user + '\0' + suffix)
E       TypeError: can't concat str to bytes

../client.py:260: TypeError
_____________________________________ TestSOCKS4ClientFactory.test_dataSentByPeer _____________________________________

self = <txsocksx.test.test_client.TestSOCKS4ClientFactory testMethod=test_dataSentByPeer>

    def test_dataSentByPeer(self):
        wrappedFac = FakeFactory()
>       fac, proto = self.makeProto('', 0, wrappedFac)

test_client.py:475: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:362: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:272: in prepareParsing
    self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS4Sender object at 0x7f9c97a6bdd8>, host = '\x00\x00\x00\x01', port = 0, user = ''

    def sendRequest(self, host, port, user):
        data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port)
        try:
            host = socket.inet_pton(socket.AF_INET, host)
        except socket.error:
            host, suffix = '\0\0\0\1', host + '\0'
        else:
            suffix = ''
>       self.transport.write(data + host + user + '\0' + suffix)
E       TypeError: can't concat str to bytes

../client.py:260: TypeError
_____________________________________ TestSOCKS4ClientFactory.test_defaultFactory _____________________________________

self = <txsocksx.test.test_client.TestSOCKS4ClientFactory testMethod=test_defaultFactory>

    def test_defaultFactory(self):
>       fac, proto = self.makeProto('127.0.0.1', 0, None)

test_client.py:449: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:362: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:272: in prepareParsing
    self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS4Sender object at 0x7f9c984423c8>, host = b'\x7f\x00\x00\x01', port = 0, user = ''

    def sendRequest(self, host, port, user):
        data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port)
        try:
            host = socket.inet_pton(socket.AF_INET, host)
        except socket.error:
            host, suffix = '\0\0\0\1', host + '\0'
        else:
            suffix = ''
>       self.transport.write(data + host + user + '\0' + suffix)
E       TypeError: can't concat str to bytes

../client.py:260: TypeError
_____________________________________ TestSOCKS4ClientFactory.test_differentUser ______________________________________

self = <txsocksx.test.test_client.TestSOCKS4ClientFactory testMethod=test_differentUser>

    def test_differentUser(self):
>       fac, proto = self.makeProto('127.0.0.1', 0, None, 'spam')

test_client.py:457: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:362: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:272: in prepareParsing
    self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS4Sender object at 0x7f9c97691cc0>, host = b'\x7f\x00\x00\x01', port = 0, user = 'spam'

    def sendRequest(self, host, port, user):
        data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port)
        try:
            host = socket.inet_pton(socket.AF_INET, host)
        except socket.error:
            host, suffix = '\0\0\0\1', host + '\0'
        else:
            suffix = ''
>       self.transport.write(data + host + user + '\0' + suffix)
E       TypeError: can't concat str to bytes

../client.py:260: TypeError
________________________________________ TestSOCKS4ClientFactory.test_hostname ________________________________________

self = <txsocksx.test.test_client.TestSOCKS4ClientFactory testMethod=test_hostname>

    def test_hostname(self):
>       fac, proto = self.makeProto('spam.com', 0, None)

test_client.py:453: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:362: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:272: in prepareParsing
    self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS4Sender object at 0x7f9c98805668>, host = '\x00\x00\x00\x01', port = 0, user = ''

    def sendRequest(self, host, port, user):
        data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port)
        try:
            host = socket.inet_pton(socket.AF_INET, host)
        except socket.error:
            host, suffix = '\0\0\0\1', host + '\0'
        else:
            suffix = ''
>       self.transport.write(data + host + user + '\0' + suffix)
E       TypeError: can't concat str to bytes

../client.py:260: TypeError
_______________________________________ TestSOCKS4ClientFactory.test_invalidIPs _______________________________________

self = <txsocksx.test.test_client.TestSOCKS4ClientFactory testMethod=test_invalidIPs>

    def test_invalidIPs(self):
>       self.assertRaises(ValueError, client.SOCKS4ClientFactory, '0.0.0.1', 0, None)

test_client.py:482: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/trial/_synctest.py:421: in assertRaises
    return context._handle(lambda: f(*args, **kwargs))
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/trial/_synctest.py:315: in _handle
    self._returnValue = obj()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/trial/_synctest.py:331: in __exit__
    self._expectedName, self._returnValue)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.test.test_client.TestSOCKS4ClientFactory testMethod=test_invalidIPs>
msg = 'ValueError not raised (<txsocksx.client.SOCKS4ClientFactory object at 0x7f9c985c86d8> returned)'

    def fail(self, msg=None):
        """
        Absolutely fail the test.  Do not pass go, do not collect $200.
    
        @param msg: the message that will be displayed as the reason for the
        failure
        """
>       raise self.failureException(msg)
E       twisted.trial.unittest.FailTest: ValueError not raised (<txsocksx.client.SOCKS4ClientFactory object at 0x7f9c985c86d8> returned)

/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/trial/_synctest.py:375: FailTest
______________________________ TestSOCKS4ClientFactory.test_noProtocolFromWrappedFactory ______________________________

self = <txsocksx.test.test_client.TestSOCKS4ClientFactory testMethod=test_noProtocolFromWrappedFactory>

    def test_noProtocolFromWrappedFactory(self):
        wrappedFac = FakeFactory(returnNoProtocol=True)
>       fac, proto = self.makeProto('', 0, wrappedFac)

test_client.py:468: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_client.py:362: in makeProto
    proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:272: in prepareParsing
    self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS4Sender object at 0x7f9c97670e48>, host = '\x00\x00\x00\x01', port = 0, user = ''

    def sendRequest(self, host, port, user):
        data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port)
        try:
            host = socket.inet_pton(socket.AF_INET, host)
        except socket.error:
            host, suffix = '\0\0\0\1', host + '\0'
        else:
            suffix = ''
>       self.transport.write(data + host + user + '\0' + suffix)
E       TypeError: can't concat str to bytes

../client.py:260: TypeError
_________________________________ TestSOCKS5ClientEndpoint.test_anonymousAndLoginAuth _________________________________

self = <txsocksx.test.test_client.TestSOCKS5ClientEndpoint testMethod=test_anonymousAndLoginAuth>

    def test_anonymousAndLoginAuth(self):
        proxy = FakeEndpoint()
        endpoint = client.SOCKS5ClientEndpoint('', 0, proxy, methods={'anonymous': (), 'login': ()})
>       endpoint.connect(None)

test_client.py:502: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../client.py:242: in connect
    proxyFac = SOCKS5ClientFactory(self.host, self.port, fac, self.methods)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c985d3550>, host = '', port = 0, proxiedFactory = None
methods = {'anonymous': (), 'login': ()}

    def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}):
        if not methods:
            raise ValueError('no auth methods were specified')
        self.host = host
        self.port = port
        self.proxiedFactory = proxiedFactory
        self.methods = dict(
            (self.authMethodMap[method], value)
>           for method, value in methods.iteritems())
E       AttributeError: 'dict' object has no attribute 'iteritems'

../client.py:180: AttributeError
________________________________ TestSOCKS5ClientEndpoint.test_buildingWrappedFactory _________________________________

self = <txsocksx.test.test_client.TestSOCKS5ClientEndpoint testMethod=test_buildingWrappedFactory>

    def test_buildingWrappedFactory(self):
        wrappedFac = FakeFactory()
        proxy = FakeEndpoint()
        endpoint = client.SOCKS5ClientEndpoint('', 0, proxy)
>       d = endpoint.connect(wrappedFac)

test_client.py:519: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../client.py:242: in connect
    proxyFac = SOCKS5ClientFactory(self.host, self.port, fac, self.methods)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c97e9b438>, host = '', port = 0
proxiedFactory = <txsocksx.test.test_client.FakeFactory object at 0x7f9c97e9b1d0>, methods = {'anonymous': ()}

    def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}):
        if not methods:
            raise ValueError('no auth methods were specified')
        self.host = host
        self.port = port
        self.proxiedFactory = proxiedFactory
        self.methods = dict(
            (self.authMethodMap[method], value)
>           for method, value in methods.iteritems())
E       AttributeError: 'dict' object has no attribute 'iteritems'

../client.py:180: AttributeError
________________________________ TestSOCKS5ClientEndpoint.test_clientConnectionFailed _________________________________

self = <txsocksx.test.test_client.TestSOCKS5ClientEndpoint testMethod=test_clientConnectionFailed>

    def test_clientConnectionFailed(self):
        proxy = FakeEndpoint(failure=connectionRefusedFailure)
        endpoint = client.SOCKS5ClientEndpoint('', 0, proxy)
>       d = endpoint.connect(None)

test_client.py:490: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../client.py:242: in connect
    proxyFac = SOCKS5ClientFactory(self.host, self.port, fac, self.methods)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c9809fe80>, host = '', port = 0, proxiedFactory = None
methods = {'anonymous': ()}

    def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}):
        if not methods:
            raise ValueError('no auth methods were specified')
        self.host = host
        self.port = port
        self.proxiedFactory = proxiedFactory
        self.methods = dict(
            (self.authMethodMap[method], value)
>           for method, value in methods.iteritems())
E       AttributeError: 'dict' object has no attribute 'iteritems'

../client.py:180: AttributeError
____________________________________ TestSOCKS5ClientEndpoint.test_dataSentByPeer _____________________________________

self = <txsocksx.test.test_client.TestSOCKS5ClientEndpoint testMethod=test_dataSentByPeer>

    def test_dataSentByPeer(self):
        wrappedFac = FakeFactory()
        proxy = FakeEndpoint()
        endpoint = client.SOCKS5ClientEndpoint('', 0, proxy)
>       endpoint.connect(wrappedFac)

test_client.py:529: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../client.py:242: in connect
    proxyFac = SOCKS5ClientFactory(self.host, self.port, fac, self.methods)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c97691278>, host = '', port = 0
proxiedFactory = <txsocksx.test.test_client.FakeFactory object at 0x7f9c98b60438>, methods = {'anonymous': ()}

    def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}):
        if not methods:
            raise ValueError('no auth methods were specified')
        self.host = host
        self.port = port
        self.proxiedFactory = proxiedFactory
        self.methods = dict(
            (self.authMethodMap[method], value)
>           for method, value in methods.iteritems())
E       AttributeError: 'dict' object has no attribute 'iteritems'

../client.py:180: AttributeError
____________________________________ TestSOCKS5ClientEndpoint.test_defaultFactory _____________________________________

self = <txsocksx.test.test_client.TestSOCKS5ClientEndpoint testMethod=test_defaultFactory>

    def test_defaultFactory(self):
        proxy = FakeEndpoint()
        endpoint = client.SOCKS5ClientEndpoint('', 0, proxy)
>       endpoint.connect(None)

test_client.py:496: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../client.py:242: in connect
    proxyFac = SOCKS5ClientFactory(self.host, self.port, fac, self.methods)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c97e861d0>, host = '', port = 0, proxiedFactory = None
methods = {'anonymous': ()}

    def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}):
        if not methods:
            raise ValueError('no auth methods were specified')
        self.host = host
        self.port = port
        self.proxiedFactory = proxiedFactory
        self.methods = dict(
            (self.authMethodMap[method], value)
>           for method, value in methods.iteritems())
E       AttributeError: 'dict' object has no attribute 'iteritems'

../client.py:180: AttributeError
_____________________________________ TestSOCKS5ClientEndpoint.test_justLoginAuth _____________________________________

self = <txsocksx.test.test_client.TestSOCKS5ClientEndpoint testMethod=test_justLoginAuth>

    def test_justLoginAuth(self):
        proxy = FakeEndpoint()
        endpoint = client.SOCKS5ClientEndpoint('', 0, proxy, methods={'login': ()})
>       endpoint.connect(None)

test_client.py:508: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../client.py:242: in connect
    proxyFac = SOCKS5ClientFactory(self.host, self.port, fac, self.methods)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c98725780>, host = '', port = 0, proxiedFactory = None
methods = {'login': ()}

    def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}):
        if not methods:
            raise ValueError('no auth methods were specified')
        self.host = host
        self.port = port
        self.proxiedFactory = proxiedFactory
        self.methods = dict(
            (self.authMethodMap[method], value)
>           for method, value in methods.iteritems())
E       AttributeError: 'dict' object has no attribute 'iteritems'

../client.py:180: AttributeError
________________________________ TestSOCKS4ClientEndpoint.test_buildingWrappedFactory _________________________________

self = <txsocksx.test.test_client.TestSOCKS4ClientEndpoint testMethod=test_buildingWrappedFactory>

    def test_buildingWrappedFactory(self):
        wrappedFac = FakeFactory()
        proxy = FakeEndpoint()
        endpoint = client.SOCKS4ClientEndpoint('', 0, proxy)
>       d = endpoint.connect(wrappedFac)

test_client.py:565: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../client.py:351: in connect
    d = self.proxyEndpoint.connect(proxyFac)
util.py:28: in connect
    self.proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:272: in prepareParsing
    self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS4Sender object at 0x7f9c985e6390>, host = '\x00\x00\x00\x01', port = 0, user = ''

    def sendRequest(self, host, port, user):
        data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port)
        try:
            host = socket.inet_pton(socket.AF_INET, host)
        except socket.error:
            host, suffix = '\0\0\0\1', host + '\0'
        else:
            suffix = ''
>       self.transport.write(data + host + user + '\0' + suffix)
E       TypeError: can't concat str to bytes

../client.py:260: TypeError
____________________________________ TestSOCKS4ClientEndpoint.test_dataSentByPeer _____________________________________

self = <txsocksx.test.test_client.TestSOCKS4ClientEndpoint testMethod=test_dataSentByPeer>

    def test_dataSentByPeer(self):
        wrappedFac = FakeFactory()
        proxy = FakeEndpoint()
        endpoint = client.SOCKS4ClientEndpoint('', 0, proxy)
>       endpoint.connect(wrappedFac)

test_client.py:575: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../client.py:351: in connect
    d = self.proxyEndpoint.connect(proxyFac)
util.py:28: in connect
    self.proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:272: in prepareParsing
    self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS4Sender object at 0x7f9c982ab400>, host = '\x00\x00\x00\x01', port = 0, user = ''

    def sendRequest(self, host, port, user):
        data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port)
        try:
            host = socket.inet_pton(socket.AF_INET, host)
        except socket.error:
            host, suffix = '\0\0\0\1', host + '\0'
        else:
            suffix = ''
>       self.transport.write(data + host + user + '\0' + suffix)
E       TypeError: can't concat str to bytes

../client.py:260: TypeError
____________________________________ TestSOCKS4ClientEndpoint.test_defaultFactory _____________________________________

self = <txsocksx.test.test_client.TestSOCKS4ClientEndpoint testMethod=test_defaultFactory>

    def test_defaultFactory(self):
        proxy = FakeEndpoint()
        endpoint = client.SOCKS4ClientEndpoint('127.0.0.1', 0, proxy)
>       endpoint.connect(None)

test_client.py:546: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../client.py:351: in connect
    d = self.proxyEndpoint.connect(proxyFac)
util.py:28: in connect
    self.proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:272: in prepareParsing
    self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS4Sender object at 0x7f9c98447470>, host = b'\x7f\x00\x00\x01', port = 0, user = ''

    def sendRequest(self, host, port, user):
        data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port)
        try:
            host = socket.inet_pton(socket.AF_INET, host)
        except socket.error:
            host, suffix = '\0\0\0\1', host + '\0'
        else:
            suffix = ''
>       self.transport.write(data + host + user + '\0' + suffix)
E       TypeError: can't concat str to bytes

../client.py:260: TypeError
_____________________________________ TestSOCKS4ClientEndpoint.test_differentUser _____________________________________

self = <txsocksx.test.test_client.TestSOCKS4ClientEndpoint testMethod=test_differentUser>

    def test_differentUser(self):
        proxy = FakeEndpoint()
        endpoint = client.SOCKS4ClientEndpoint('127.0.0.1', 0, proxy, 'spam')
>       endpoint.connect(None)

test_client.py:558: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../client.py:351: in connect
    d = self.proxyEndpoint.connect(proxyFac)
util.py:28: in connect
    self.proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:272: in prepareParsing
    self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS4Sender object at 0x7f9c98047b70>, host = b'\x7f\x00\x00\x01', port = 0, user = 'spam'

    def sendRequest(self, host, port, user):
        data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port)
        try:
            host = socket.inet_pton(socket.AF_INET, host)
        except socket.error:
            host, suffix = '\0\0\0\1', host + '\0'
        else:
            suffix = ''
>       self.transport.write(data + host + user + '\0' + suffix)
E       TypeError: can't concat str to bytes

../client.py:260: TypeError
_______________________________________ TestSOCKS4ClientEndpoint.test_hostname ________________________________________

self = <txsocksx.test.test_client.TestSOCKS4ClientEndpoint testMethod=test_hostname>

    def test_hostname(self):
        proxy = FakeEndpoint()
        endpoint = client.SOCKS4ClientEndpoint('spam.com', 0, proxy)
>       endpoint.connect(None)

test_client.py:552: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../client.py:351: in connect
    d = self.proxyEndpoint.connect(proxyFac)
util.py:28: in connect
    self.proto.makeConnection(transport)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection
    self.connectionMade()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade
    self.receiver.prepareParsing(self)
../client.py:272: in prepareParsing
    self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.client.SOCKS4Sender object at 0x7f9c97e6bbe0>, host = '\x00\x00\x00\x01', port = 0, user = ''

    def sendRequest(self, host, port, user):
        data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port)
        try:
            host = socket.inet_pton(socket.AF_INET, host)
        except socket.error:
            host, suffix = '\0\0\0\1', host + '\0'
        else:
            suffix = ''
>       self.transport.write(data + host + user + '\0' + suffix)
E       TypeError: can't concat str to bytes

../client.py:260: TypeError
______________________________________ TestSOCKS4ClientEndpoint.test_invalidIPs _______________________________________

self = <txsocksx.test.test_client.TestSOCKS4ClientEndpoint testMethod=test_invalidIPs>

    def test_invalidIPs(self):
>       self.assertRaises(ValueError, client.SOCKS4ClientEndpoint, '0.0.0.1', 0, None)

test_client.py:582: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/trial/_synctest.py:421: in assertRaises
    return context._handle(lambda: f(*args, **kwargs))
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/trial/_synctest.py:315: in _handle
    self._returnValue = obj()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/trial/_synctest.py:331: in __exit__
    self._expectedName, self._returnValue)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.test.test_client.TestSOCKS4ClientEndpoint testMethod=test_invalidIPs>
msg = 'ValueError not raised (<txsocksx.client.SOCKS4ClientEndpoint object at 0x7f9c988a60f0> returned)'

    def fail(self, msg=None):
        """
        Absolutely fail the test.  Do not pass go, do not collect $200.
    
        @param msg: the message that will be displayed as the reason for the
        failure
        """
>       raise self.failureException(msg)
E       twisted.trial.unittest.FailTest: ValueError not raised (<txsocksx.client.SOCKS4ClientEndpoint object at 0x7f9c988a60f0> returned)

/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/trial/_synctest.py:375: FailTest
___________________________________________ TestGrammar.test_SOCKS4Request ____________________________________________

self = <txsocksx.test.test_grammar.TestGrammar testMethod=test_SOCKS4Request>

    def test_SOCKS4Request(self):
        parse = stringParserFromRule('SOCKS4Request')
>       self.assertEqual(parse('\x04\x01\x01\x00\x7f\x00\x00\x01spam\x00'),
                         ('tcp-connect', 256, '127.0.0.1', 'spam'))

test_grammar.py:36: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_grammar.py:15: in parseString
    return getattr(grammar(s), rule)()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/parsley.py:85: in invokeRule
    ret, err = self._grammar.apply(name, *args)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:462: in apply
    val, err = self._apply(r, ruleName, args)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply
    [rule(), self.input])
/pymeta_generated_code/pymeta_grammar__Grammar.py:198: in rule_SOCKS4Request
    _G_apply_61, lastError = self._apply(self.rule_SOCKS4aHostUser, "SOCKS4aHostUser", [])
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply
    [rule(), self.input])
/pymeta_generated_code/pymeta_grammar__Grammar.py:178: in rule_SOCKS4aHostUser
    _G_or_57, lastError = self._or([_G_or_44, _G_or_55])
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:598: in _or
    ret, err = f()
/pymeta_generated_code/pymeta_grammar__Grammar.py:175: in _G_or_55
    _G_apply_56, lastError = self._apply(self.rule_SOCKS4HostUser, "SOCKS4HostUser", [])
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply
    [rule(), self.input])
/pymeta_generated_code/pymeta_grammar__Grammar.py:129: in rule_SOCKS4HostUser
    _G_apply_40, lastError = self._apply(self.rule_ipv4Address, "ipv4Address", [])
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply
    [rule(), self.input])
/pymeta_generated_code/pymeta_grammar__Grammar.py:78: in rule_ipv4Address
    _G_python_25, lastError = eval(self._G_expr_24, self.globals, _locals), None
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   ???
E   TypeError: a bytes-like object is required, not 'str'

<string>:1: TypeError
___________________________________________ TestGrammar.test_SOCKS4Response ___________________________________________

self = <txsocksx.test.test_grammar.TestGrammar testMethod=test_SOCKS4Response>

    def test_SOCKS4Response(self):
        parse = stringParserFromRule('SOCKS4Response')
>       self.assertEqual(parse('\x00' * 8), (0, '0.0.0.0', 0))

test_grammar.py:43: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_grammar.py:15: in parseString
    return getattr(grammar(s), rule)()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/parsley.py:85: in invokeRule
    ret, err = self._grammar.apply(name, *args)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:462: in apply
    val, err = self._apply(r, ruleName, args)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply
    [rule(), self.input])
/pymeta_generated_code/pymeta_grammar__Grammar.py:221: in rule_SOCKS4Response
    _G_apply_67, lastError = self._apply(self.rule_ipv4Address, "ipv4Address", [])
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply
    [rule(), self.input])
/pymeta_generated_code/pymeta_grammar__Grammar.py:78: in rule_ipv4Address
    _G_python_25, lastError = eval(self._G_expr_24, self.globals, _locals), None
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   ???
E   TypeError: a bytes-like object is required, not 'str'

<string>:1: TypeError
__________________________________________ TestGrammar.test_SOCKS4aHostUser ___________________________________________

self = <txsocksx.test.test_grammar.TestGrammar testMethod=test_SOCKS4aHostUser>

    def test_SOCKS4aHostUser(self):
        parse = stringParserFromRule('SOCKS4aHostUser')
>       self.assertEqual(parse('\x7f\x00\x00\x01spam\x00'), ('127.0.0.1', 'spam'))

test_grammar.py:22: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_grammar.py:15: in parseString
    return getattr(grammar(s), rule)()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/parsley.py:85: in invokeRule
    ret, err = self._grammar.apply(name, *args)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:462: in apply
    val, err = self._apply(r, ruleName, args)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply
    [rule(), self.input])
/pymeta_generated_code/pymeta_grammar__Grammar.py:178: in rule_SOCKS4aHostUser
    _G_or_57, lastError = self._or([_G_or_44, _G_or_55])
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:598: in _or
    ret, err = f()
/pymeta_generated_code/pymeta_grammar__Grammar.py:175: in _G_or_55
    _G_apply_56, lastError = self._apply(self.rule_SOCKS4HostUser, "SOCKS4HostUser", [])
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply
    [rule(), self.input])
/pymeta_generated_code/pymeta_grammar__Grammar.py:129: in rule_SOCKS4HostUser
    _G_apply_40, lastError = self._apply(self.rule_ipv4Address, "ipv4Address", [])
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply
    [rule(), self.input])
/pymeta_generated_code/pymeta_grammar__Grammar.py:78: in rule_ipv4Address
    _G_python_25, lastError = eval(self._G_expr_24, self.globals, _locals), None
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   ???
E   TypeError: a bytes-like object is required, not 'str'

<string>:1: TypeError
___________________________________________ TestGrammar.test_SOCKS5Address ____________________________________________

self = <txsocksx.test.test_grammar.TestGrammar testMethod=test_SOCKS5Address>

    def test_SOCKS5Address(self):
        parse = stringParserFromRule('SOCKS5Address')
>       self.assertEqual(parse('\x01\x00\x00\x00\x00'), '0.0.0.0')

test_grammar.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_grammar.py:15: in parseString
    return getattr(grammar(s), rule)()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/parsley.py:85: in invokeRule
    ret, err = self._grammar.apply(name, *args)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:462: in apply
    val, err = self._apply(r, ruleName, args)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply
    [rule(), self.input])
/pymeta_generated_code/pymeta_grammar__Grammar.py:333: in rule_SOCKS5Address
    _G_or_103, lastError = self._or([_G_or_90, _G_or_95, _G_or_99])
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:598: in _or
    ret, err = f()
/pymeta_generated_code/pymeta_grammar__Grammar.py:305: in _G_or_90
    _G_apply_92, lastError = self._apply(self.rule_ipv4Address, "ipv4Address", [])
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply
    [rule(), self.input])
/pymeta_generated_code/pymeta_grammar__Grammar.py:78: in rule_ipv4Address
    _G_python_25, lastError = eval(self._G_expr_24, self.globals, _locals), None
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   ???
E   TypeError: a bytes-like object is required, not 'str'

<string>:1: TypeError
________________________________________ TestGrammar.test_SOCKS5ServerResponse ________________________________________

self = <txsocksx.test.test_grammar.TestGrammar testMethod=test_SOCKS5ServerResponse>

    def test_SOCKS5ServerResponse(self):
        parse = stringParserFromRule('SOCKS5ServerResponse')
        self.assertEqual(parse('\x05\x00\x00\x03\x00\x00\x00'), (0, '', 0))
>       self.assertEqual(parse('\x05\x01\x00\x01\x7f\x00\x00\x01\x01\x00'),
                         (1, '127.0.0.1', 256))

test_grammar.py:83: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_grammar.py:15: in parseString
    return getattr(grammar(s), rule)()
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/parsley.py:85: in invokeRule
    ret, err = self._grammar.apply(name, *args)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:462: in apply
    val, err = self._apply(r, ruleName, args)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply
    [rule(), self.input])
/pymeta_generated_code/pymeta_grammar__Grammar.py:379: in rule_SOCKS5ServerResponse
    _G_apply_113, lastError = self._apply(self.rule_SOCKS5Address, "SOCKS5Address", [])
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply
    [rule(), self.input])
/pymeta_generated_code/pymeta_grammar__Grammar.py:333: in rule_SOCKS5Address
    _G_or_103, lastError = self._or([_G_or_90, _G_or_95, _G_or_99])
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:598: in _or
    ret, err = f()
/pymeta_generated_code/pymeta_grammar__Grammar.py:305: in _G_or_90
    _G_apply_92, lastError = self._apply(self.rule_ipv4Address, "ipv4Address", [])
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply
    [rule(), self.input])
/pymeta_generated_code/pymeta_grammar__Grammar.py:78: in rule_ipv4Address
    _G_python_25, lastError = eval(self._G_expr_24, self.globals, _locals), None
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   ???
E   TypeError: a bytes-like object is required, not 'str'

<string>:1: TypeError
__________________________________________ TestSOCKS5Agent.test_HTTPRequest ___________________________________________

self = <txsocksx.test.test_http.TestSOCKS5Agent testMethod=test_HTTPRequest>

    def test_HTTPRequest(self):
>       self.agent.request('GET', 'http://spam.com/eggs')

test_http.py:36: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../http.py:43: in request
    return self._wrappedAgent.request(*a, **kw)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/client.py:1649: in request
    parsedURI = URI.fromBytes(uri)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/client.py:638: in fromBytes
    scheme, netloc, path, params, query, fragment = http.urlparse(uri)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

url = 'http://spam.com/eggs'

    def urlparse(url):
        """
        Parse an URL into six components.
    
        This is similar to C{urlparse.urlparse}, but rejects C{unicode} input
        and always produces C{bytes} output.
    
        @type url: C{bytes}
    
        @raise TypeError: The given url was a C{unicode} string instead of a
            C{bytes}.
    
        @return: The scheme, net location, path, params, query string, and fragment
            of the URL - all as C{bytes}.
        @rtype: C{ParseResultBytes}
        """
        if isinstance(url, unicode):
>           raise TypeError("url must be bytes, not unicode")
E           TypeError: url must be bytes, not unicode

/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/http.py:181: TypeError
__________________________________________ TestSOCKS5Agent.test_HTTPSRequest __________________________________________

self = <txsocksx.test.test_http.TestSOCKS5Agent testMethod=test_HTTPSRequest>

    def test_HTTPSRequest(self):
>       self.agent.request('GET', 'https://spam.com/eggs')

test_http.py:45: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../http.py:43: in request
    return self._wrappedAgent.request(*a, **kw)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/client.py:1649: in request
    parsedURI = URI.fromBytes(uri)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/client.py:638: in fromBytes
    scheme, netloc, path, params, query, fragment = http.urlparse(uri)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

url = 'https://spam.com/eggs'

    def urlparse(url):
        """
        Parse an URL into six components.
    
        This is similar to C{urlparse.urlparse}, but rejects C{unicode} input
        and always produces C{bytes} output.
    
        @type url: C{bytes}
    
        @raise TypeError: The given url was a C{unicode} string instead of a
            C{bytes}.
    
        @return: The scheme, net location, path, params, query string, and fragment
            of the URL - all as C{bytes}.
        @rtype: C{ParseResultBytes}
        """
        if isinstance(url, unicode):
>           raise TypeError("url must be bytes, not unicode")
E           TypeError: url must be bytes, not unicode

/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/http.py:181: TypeError
__________________________________________ TestSOCKS4Agent.test_HTTP4Request __________________________________________

self = <txsocksx.test.test_http.TestSOCKS4Agent testMethod=test_HTTP4Request>

    def test_HTTP4Request(self):
>       self.agent.request('GET', 'http://127.0.0.1/eggs')

test_http.py:59: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../http.py:43: in request
    return self._wrappedAgent.request(*a, **kw)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/client.py:1649: in request
    parsedURI = URI.fromBytes(uri)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/client.py:638: in fromBytes
    scheme, netloc, path, params, query, fragment = http.urlparse(uri)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

url = 'http://127.0.0.1/eggs'

    def urlparse(url):
        """
        Parse an URL into six components.
    
        This is similar to C{urlparse.urlparse}, but rejects C{unicode} input
        and always produces C{bytes} output.
    
        @type url: C{bytes}
    
        @raise TypeError: The given url was a C{unicode} string instead of a
            C{bytes}.
    
        @return: The scheme, net location, path, params, query string, and fragment
            of the URL - all as C{bytes}.
        @rtype: C{ParseResultBytes}
        """
        if isinstance(url, unicode):
>           raise TypeError("url must be bytes, not unicode")
E           TypeError: url must be bytes, not unicode

/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/http.py:181: TypeError
_________________________________________ TestSOCKS4Agent.test_HTTP4aRequest __________________________________________

self = <txsocksx.test.test_http.TestSOCKS4Agent testMethod=test_HTTP4aRequest>

    def test_HTTP4aRequest(self):
>       self.agent.request('GET', 'http://spam.com/eggs')

test_http.py:68: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../http.py:43: in request
    return self._wrappedAgent.request(*a, **kw)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/client.py:1649: in request
    parsedURI = URI.fromBytes(uri)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/client.py:638: in fromBytes
    scheme, netloc, path, params, query, fragment = http.urlparse(uri)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

url = 'http://spam.com/eggs'

    def urlparse(url):
        """
        Parse an URL into six components.
    
        This is similar to C{urlparse.urlparse}, but rejects C{unicode} input
        and always produces C{bytes} output.
    
        @type url: C{bytes}
    
        @raise TypeError: The given url was a C{unicode} string instead of a
            C{bytes}.
    
        @return: The scheme, net location, path, params, query string, and fragment
            of the URL - all as C{bytes}.
        @rtype: C{ParseResultBytes}
        """
        if isinstance(url, unicode):
>           raise TypeError("url must be bytes, not unicode")
E           TypeError: url must be bytes, not unicode

/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/http.py:181: TypeError
__________________________________________ TestSOCKS4Agent.test_HTTPSRequest __________________________________________

self = <txsocksx.test.test_http.TestSOCKS4Agent testMethod=test_HTTPSRequest>

    def test_HTTPSRequest(self):
>       self.agent.request('GET', 'https://spam.com/eggs')

test_http.py:77: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../http.py:43: in request
    return self._wrappedAgent.request(*a, **kw)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/client.py:1649: in request
    parsedURI = URI.fromBytes(uri)
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/client.py:638: in fromBytes
    scheme, netloc, path, params, query, fragment = http.urlparse(uri)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

url = 'https://spam.com/eggs'

    def urlparse(url):
        """
        Parse an URL into six components.
    
        This is similar to C{urlparse.urlparse}, but rejects C{unicode} input
        and always produces C{bytes} output.
    
        @type url: C{bytes}
    
        @raise TypeError: The given url was a C{unicode} string instead of a
            C{bytes}.
    
        @return: The scheme, net location, path, params, query string, and fragment
            of the URL - all as C{bytes}.
        @rtype: C{ParseResultBytes}
        """
        if isinstance(url, unicode):
>           raise TypeError("url must be bytes, not unicode")
E           TypeError: url must be bytes, not unicode

/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/http.py:181: TypeError
_________________________________ TLSWrapClientEndpointTestCase.test_methodsAvailable _________________________________

self = <txsocksx.test.test_tls.TLSWrapClientEndpointTestCase testMethod=test_methodsAvailable>

    def test_methodsAvailable(self):
        """
        Methods defined on the Protocol are accessible from the Protocol
        returned from connect's Deferred.
        """
        proto = self.successResultOf(self.wrapper.connect(self.factory))
>       proto.sendString('spam')

test_tls.py:50: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/protocols/basic.py:163: in sendString
    self.transport.write(_formatNetstring(string))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

data = 'spam'

    def _formatNetstring(data):
>       return b''.join([str(len(data)).encode("ascii"), b':', data, b','])
E       TypeError: sequence item 2: expected a bytes-like object, str found

/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/protocols/basic.py:30: TypeError
_________________________________ TLSWrapClientEndpointTestCase.test_wrappingBehavior _________________________________

self = <txsocksx.test.test_tls.TLSWrapClientEndpointTestCase testMethod=test_wrappingBehavior>

    def test_wrappingBehavior(self):
        """
        Any modifications performed by the underlying ProtocolWrapper
        propagate through to the wrapped Protocol.
        """
        proto = self.successResultOf(self.wrapper.connect(self.factory))
>       self.endpoint.proto.dataReceived('5:hello,')

test_tls.py:41: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
util.py:35: in dataReceived
    policies.ProtocolWrapper.dataReceived(self, data.upper())
/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/protocols/policies.py:120: in dataReceived
    self.wrappedProtocol.dataReceived(data)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <txsocksx.test.test_tls.NetstringTracker object at 0x7f9c976a2550>, data = '5:HELLO,'

    def dataReceived(self, data):
        """
        Receives some characters of a netstring.
    
        Whenever a complete netstring is received, this method extracts
        its payload and calls L{stringReceived} to process it.
    
        @param data: A chunk of data representing a (possibly partial)
            netstring
        @type data: C{bytes}
        """
>       self._remainingData += data
E       TypeError: can't concat str to bytes

/home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/protocols/basic.py:177: TypeError
======================================== 75 failed, 11 passed in 4.88 seconds =========================================
(txsocksx) anand@anand-HP-Pavilion-Laptop-15-cc1xx:~/projects/anvetsu/tahoe/txsocksx/txsocksx/test\ {2019-03-18 19:40:34}
The tests fail majestically. ``` anand@anand-HP-Pavilion-Laptop-15-cc1xx:~/projects/anvetsu/tahoe/txsocksx/txsocksx/test\ {2019-03-18 19:40:11} $ txsocksx_venv (txsocksx) anand@anand-HP-Pavilion-Laptop-15-cc1xx:~/projects/anvetsu/tahoe/txsocksx/txsocksx/test\ {2019-03-18 19:40:25} $ pytest ================================================= test session starts ================================================= platform linux -- Python 3.5.6, pytest-4.3.1, py-1.8.0, pluggy-0.9.0 rootdir: /home/anand/projects/anvetsu/tahoe/txsocksx, inifile: collected 86 items test_client.py FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF.FFFFFFFFFFFFFFFFFF.F.FFFFF [ 76%] test_grammar.py .FFFF....F [ 88%] test_http.py FFFFF [ 94%] test_tls.py ...FF [100%] ====================================================== FAILURES ======================================================= _________________________________________ TestSOCKS5Client.test_authAddition __________________________________________ self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_authAddition> def test_authAddition(self): fac, proto = self.makeProto( > _protoClass=AdditionAuthSOCKS5Client, methods={'A': ('x', 'y')}) test_client.py:222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:111: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:126: in prepareParsing self.sender.sendAuthMethods(self.factory.methods) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5Sender object at 0x7f9c97eefdd8>, methods = {'A': ('x', 'y')} def sendAuthMethods(self, methods): self.transport.write( > struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods)) E TypeError: can't concat str to bytes ../client.py:88: TypeError ___________________________________________ TestSOCKS5Client.test_buffering ___________________________________________ self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_buffering> def test_buffering(self): > fac, proto = self.makeProto() test_client.py:192: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:111: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:126: in prepareParsing self.sender.sendAuthMethods(self.factory.methods) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5Sender object at 0x7f9c986cf5c0>, methods = {'\x00': ()} def sendAuthMethods(self, methods): self.transport.write( > struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods)) E TypeError: can't concat str to bytes ../client.py:88: TypeError ________________________________ TestSOCKS5Client.test_connectionLostAfterNegotiation _________________________________ self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_connectionLostAfterNegotiation> def test_connectionLostAfterNegotiation(self): > fac, proto = self.makeProto() test_client.py:209: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:111: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:126: in prepareParsing self.sender.sendAuthMethods(self.factory.methods) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5Sender object at 0x7f9c9765dda0>, methods = {'\x00': ()} def sendAuthMethods(self, methods): self.transport.write( > struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods)) E TypeError: can't concat str to bytes ../client.py:88: TypeError ______________________________________ TestSOCKS5Client.test_connectionLostEarly ______________________________________ self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_connectionLostEarly> def test_connectionLostEarly(self): wholeRequest = '\x05\x00\x05\x00\x00\x01444422' > for e in xrange(len(wholeRequest)): E NameError: name 'xrange' is not defined test_client.py:199: NameError _______________________________________ TestSOCKS5Client.test_connectionRequest _______________________________________ self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_connectionRequest> def test_connectionRequest(self): > fac, proto = self.makeProto('host', 0x47) test_client.py:155: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:111: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:126: in prepareParsing self.sender.sendAuthMethods(self.factory.methods) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5Sender object at 0x7f9c98583550>, methods = {'\x00': ()} def sendAuthMethods(self, methods): self.transport.write( > struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods)) E TypeError: can't concat str to bytes ../client.py:88: TypeError ____________________________________ TestSOCKS5Client.test_connectionRequestError _____________________________________ self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_connectionRequestError> def test_connectionRequestError(self): > fac, proto = self.makeProto() test_client.py:185: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:111: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:126: in prepareParsing self.sender.sendAuthMethods(self.factory.methods) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5Sender object at 0x7f9c98ad1400>, methods = {'\x00': ()} def sendAuthMethods(self, methods): self.transport.write( > struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods)) E TypeError: can't concat str to bytes ../client.py:88: TypeError ________________________________________ TestSOCKS5Client.test_dataSentByPeer _________________________________________ self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_dataSentByPeer> def test_dataSentByPeer(self): > fac, proto = self.makeProto() test_client.py:233: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:111: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:126: in prepareParsing self.sender.sendAuthMethods(self.factory.methods) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5Sender object at 0x7f9c989520f0>, methods = {'\x00': ()} def sendAuthMethods(self, methods): self.transport.write( > struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods)) E TypeError: can't concat str to bytes ../client.py:88: TypeError _____________________________________ TestSOCKS5Client.test_failedMethodSelection _____________________________________ self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_failedMethodSelection> def test_failedMethodSelection(self): > fac, proto = self.makeProto() test_client.py:125: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:111: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:126: in prepareParsing self.sender.sendAuthMethods(self.factory.methods) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5Sender object at 0x7f9c98834a90>, methods = {'\x00': ()} def sendAuthMethods(self, methods): self.transport.write( > struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods)) E TypeError: can't concat str to bytes ../client.py:88: TypeError ___________________________________ TestSOCKS5Client.test_handshakeEatsEnoughBytes ____________________________________ self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_handshakeEatsEnoughBytes> def test_handshakeEatsEnoughBytes(self): > fac, proto = self.makeProto() test_client.py:168: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:111: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:126: in prepareParsing self.sender.sendAuthMethods(self.factory.methods) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5Sender object at 0x7f9c98691320>, methods = {'\x00': ()} def sendAuthMethods(self, methods): self.transport.write( > struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods)) E TypeError: can't concat str to bytes ../client.py:88: TypeError _______________________________________ TestSOCKS5Client.test_initialHandshake ________________________________________ self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_initialHandshake> def test_initialHandshake(self): > fac, proto = self.makeProto() test_client.py:115: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:111: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:126: in prepareParsing self.sender.sendAuthMethods(self.factory.methods) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5Sender object at 0x7f9c98ad1470>, methods = {'\x00': ()} def sendAuthMethods(self, methods): self.transport.write( > struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods)) E TypeError: can't concat str to bytes ../client.py:88: TypeError ___________________________________________ TestSOCKS5Client.test_loginAuth ___________________________________________ self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_loginAuth> def test_loginAuth(self): > fac, proto = self.makeProto(methods={c.AUTH_LOGIN: ('spam', 'eggs')}) test_client.py:134: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:111: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:126: in prepareParsing self.sender.sendAuthMethods(self.factory.methods) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5Sender object at 0x7f9c982bd1d0>, methods = {'\x02': ('spam', 'eggs')} def sendAuthMethods(self, methods): self.transport.write( > struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods)) E TypeError: can't concat str to bytes ../client.py:88: TypeError _______________________________________ TestSOCKS5Client.test_loginAuthAccepted _______________________________________ self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_loginAuthAccepted> def test_loginAuthAccepted(self): > fac, proto = self.makeProto(methods={c.AUTH_LOGIN: ('spam', 'eggs')}) test_client.py:140: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:111: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:126: in prepareParsing self.sender.sendAuthMethods(self.factory.methods) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5Sender object at 0x7f9c985b03c8>, methods = {'\x02': ('spam', 'eggs')} def sendAuthMethods(self, methods): self.transport.write( > struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods)) E TypeError: can't concat str to bytes ../client.py:88: TypeError ________________________________________ TestSOCKS5Client.test_loginAuthFailed ________________________________________ self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_loginAuthFailed> def test_loginAuthFailed(self): > fac, proto = self.makeProto(methods={c.AUTH_LOGIN: ('spam', 'eggs')}) test_client.py:147: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:111: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:126: in prepareParsing self.sender.sendAuthMethods(self.factory.methods) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5Sender object at 0x7f9c986814e0>, methods = {'\x02': ('spam', 'eggs')} def sendAuthMethods(self, methods): self.transport.write( > struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods)) E TypeError: can't concat str to bytes ../client.py:88: TypeError _______________________________________ TestSOCKS5Client.test_protocolSwitching _______________________________________ self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_protocolSwitching> def test_protocolSwitching(self): > fac, proto = self.makeProto() test_client.py:245: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:111: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:126: in prepareParsing self.sender.sendAuthMethods(self.factory.methods) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5Sender object at 0x7f9c97e56748>, methods = {'\x00': ()} def sendAuthMethods(self, methods): self.transport.write( > struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods)) E TypeError: can't concat str to bytes ../client.py:88: TypeError __________________________ TestSOCKS5Client.test_protocolSwitchingWithoutAProtocolAttribute ___________________________ self = <txsocksx.test.test_client.TestSOCKS5Client testMethod=test_protocolSwitchingWithoutAProtocolAttribute> def test_protocolSwitchingWithoutAProtocolAttribute(self): > fac, proto = self.makeProto() test_client.py:240: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:111: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:126: in prepareParsing self.sender.sendAuthMethods(self.factory.methods) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5Sender object at 0x7f9c98af0d30>, methods = {'\x00': ()} def sendAuthMethods(self, methods): self.transport.write( > struct.pack('!BB', c.VER_SOCKS5, len(methods)) + ''.join(methods)) E TypeError: can't concat str to bytes ../client.py:88: TypeError ___________________________________________ TestSOCKS4Client.test_buffering ___________________________________________ self = <txsocksx.test.test_client.TestSOCKS4Client testMethod=test_buffering> def test_buffering(self): > fac, proto = self.makeProto() test_client.py:291: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:259: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:272: in prepareParsing self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS4Sender object at 0x7f9c9815a2e8>, host = '\x00\x00\x00\x01', port = 0, user = '' def sendRequest(self, host, port, user): data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port) try: host = socket.inet_pton(socket.AF_INET, host) except socket.error: host, suffix = '\0\0\0\1', host + '\0' else: suffix = '' > self.transport.write(data + host + user + '\0' + suffix) E TypeError: can't concat str to bytes ../client.py:260: TypeError ________________________________ TestSOCKS4Client.test_connectionLostAfterNegotiation _________________________________ self = <txsocksx.test.test_client.TestSOCKS4Client testMethod=test_connectionLostAfterNegotiation> def test_connectionLostAfterNegotiation(self): > fac, proto = self.makeProto() test_client.py:308: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:259: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:272: in prepareParsing self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS4Sender object at 0x7f9c9765d6a0>, host = '\x00\x00\x00\x01', port = 0, user = '' def sendRequest(self, host, port, user): data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port) try: host = socket.inet_pton(socket.AF_INET, host) except socket.error: host, suffix = '\0\0\0\1', host + '\0' else: suffix = '' > self.transport.write(data + host + user + '\0' + suffix) E TypeError: can't concat str to bytes ../client.py:260: TypeError __________________________ TestSOCKS4Client.test_connectionLostAfterNegotiationWithSomeBytes __________________________ self = <txsocksx.test.test_client.TestSOCKS4Client testMethod=test_connectionLostAfterNegotiationWithSomeBytes> def test_connectionLostAfterNegotiationWithSomeBytes(self): > fac, proto = self.makeProto() test_client.py:314: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:259: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:272: in prepareParsing self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS4Sender object at 0x7f9c98ad1470>, host = '\x00\x00\x00\x01', port = 0, user = '' def sendRequest(self, host, port, user): data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port) try: host = socket.inet_pton(socket.AF_INET, host) except socket.error: host, suffix = '\0\0\0\1', host + '\0' else: suffix = '' > self.transport.write(data + host + user + '\0' + suffix) E TypeError: can't concat str to bytes ../client.py:260: TypeError ______________________________________ TestSOCKS4Client.test_connectionLostEarly ______________________________________ self = <txsocksx.test.test_client.TestSOCKS4Client testMethod=test_connectionLostEarly> def test_connectionLostEarly(self): wholeRequest = '\x00\x5a\x00\x00\x00\x00\x00\x00' > for e in xrange(len(wholeRequest)): E NameError: name 'xrange' is not defined test_client.py:298: NameError ____________________________________ TestSOCKS4Client.test_connectionRequestError _____________________________________ self = <txsocksx.test.test_client.TestSOCKS4Client testMethod=test_connectionRequestError> def test_connectionRequestError(self): > fac, proto = self.makeProto() test_client.py:284: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:259: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:272: in prepareParsing self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS4Sender object at 0x7f9c98b9eef0>, host = '\x00\x00\x00\x01', port = 0, user = '' def sendRequest(self, host, port, user): data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port) try: host = socket.inet_pton(socket.AF_INET, host) except socket.error: host, suffix = '\0\0\0\1', host + '\0' else: suffix = '' > self.transport.write(data + host + user + '\0' + suffix) E TypeError: can't concat str to bytes ../client.py:260: TypeError ________________________________________ TestSOCKS4Client.test_dataSentByPeer _________________________________________ self = <txsocksx.test.test_client.TestSOCKS4Client testMethod=test_dataSentByPeer> def test_dataSentByPeer(self): > fac, proto = self.makeProto() test_client.py:321: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:259: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:272: in prepareParsing self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS4Sender object at 0x7f9c988a6e48>, host = '\x00\x00\x00\x01', port = 0, user = '' def sendRequest(self, host, port, user): data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port) try: host = socket.inet_pton(socket.AF_INET, host) except socket.error: host, suffix = '\0\0\0\1', host + '\0' else: suffix = '' > self.transport.write(data + host + user + '\0' + suffix) E TypeError: can't concat str to bytes ../client.py:260: TypeError ___________________________________ TestSOCKS4Client.test_handshakeEatsEnoughBytes ____________________________________ self = <txsocksx.test.test_client.TestSOCKS4Client testMethod=test_handshakeEatsEnoughBytes> def test_handshakeEatsEnoughBytes(self): > fac, proto = self.makeProto() test_client.py:279: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:259: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:272: in prepareParsing self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS4Sender object at 0x7f9c98b43e48>, host = '\x00\x00\x00\x01', port = 0, user = '' def sendRequest(self, host, port, user): data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port) try: host = socket.inet_pton(socket.AF_INET, host) except socket.error: host, suffix = '\0\0\0\1', host + '\0' else: suffix = '' > self.transport.write(data + host + user + '\0' + suffix) E TypeError: can't concat str to bytes ../client.py:260: TypeError _______________________________________ TestSOCKS4Client.test_initialHandshake ________________________________________ self = <txsocksx.test.test_client.TestSOCKS4Client testMethod=test_initialHandshake> def test_initialHandshake(self): > fac, proto = self.makeProto(host='0.0.0.0', port=0x1234) test_client.py:263: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:259: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:272: in prepareParsing self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS4Sender object at 0x7f9c981af160>, host = b'\x00\x00\x00\x00', port = 4660, user = '' def sendRequest(self, host, port, user): data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port) try: host = socket.inet_pton(socket.AF_INET, host) except socket.error: host, suffix = '\0\0\0\1', host + '\0' else: suffix = '' > self.transport.write(data + host + user + '\0' + suffix) E TypeError: can't concat str to bytes ../client.py:260: TypeError _________________________________ TestSOCKS4Client.test_initialHandshakeWithHostname __________________________________ self = <txsocksx.test.test_client.TestSOCKS4Client testMethod=test_initialHandshakeWithHostname> def test_initialHandshakeWithHostname(self): > fac, proto = self.makeProto(host='example.com', port=0x4321) test_client.py:267: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:259: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:272: in prepareParsing self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS4Sender object at 0x7f9c97833a20>, host = '\x00\x00\x00\x01', port = 17185, user = '' def sendRequest(self, host, port, user): data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port) try: host = socket.inet_pton(socket.AF_INET, host) except socket.error: host, suffix = '\0\0\0\1', host + '\0' else: suffix = '' > self.transport.write(data + host + user + '\0' + suffix) E TypeError: can't concat str to bytes ../client.py:260: TypeError ___________________________________ TestSOCKS4Client.test_initialHandshakeWithUser ____________________________________ self = <txsocksx.test.test_client.TestSOCKS4Client testMethod=test_initialHandshakeWithUser> def test_initialHandshakeWithUser(self): > fac, proto = self.makeProto(host='0.0.0.0', port=0x1234, user='spam') test_client.py:271: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:259: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:272: in prepareParsing self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS4Sender object at 0x7f9c98447278>, host = b'\x00\x00\x00\x00', port = 4660, user = 'spam' def sendRequest(self, host, port, user): data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port) try: host = socket.inet_pton(socket.AF_INET, host) except socket.error: host, suffix = '\0\0\0\1', host + '\0' else: suffix = '' > self.transport.write(data + host + user + '\0' + suffix) E TypeError: can't concat str to bytes ../client.py:260: TypeError ______________________________ TestSOCKS4Client.test_initialHandshakeWithUserAndHostname ______________________________ self = <txsocksx.test.test_client.TestSOCKS4Client testMethod=test_initialHandshakeWithUserAndHostname> def test_initialHandshakeWithUserAndHostname(self): > fac, proto = self.makeProto(host='spam.com', port=0x1234, user='spam') test_client.py:275: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:259: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:272: in prepareParsing self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS4Sender object at 0x7f9c986cf828>, host = '\x00\x00\x00\x01', port = 4660, user = 'spam' def sendRequest(self, host, port, user): data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port) try: host = socket.inet_pton(socket.AF_INET, host) except socket.error: host, suffix = '\0\0\0\1', host + '\0' else: suffix = '' > self.transport.write(data + host + user + '\0' + suffix) E TypeError: can't concat str to bytes ../client.py:260: TypeError _______________________________________ TestSOCKS4Client.test_protocolSwitching _______________________________________ self = <txsocksx.test.test_client.TestSOCKS4Client testMethod=test_protocolSwitching> def test_protocolSwitching(self): > fac, proto = self.makeProto() test_client.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:259: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:272: in prepareParsing self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS4Sender object at 0x7f9c982ab9b0>, host = '\x00\x00\x00\x01', port = 0, user = '' def sendRequest(self, host, port, user): data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port) try: host = socket.inet_pton(socket.AF_INET, host) except socket.error: host, suffix = '\0\0\0\1', host + '\0' else: suffix = '' > self.transport.write(data + host + user + '\0' + suffix) E TypeError: can't concat str to bytes ../client.py:260: TypeError __________________________ TestSOCKS4Client.test_protocolSwitchingWithoutAProtocolAttribute ___________________________ self = <txsocksx.test.test_client.TestSOCKS4Client testMethod=test_protocolSwitchingWithoutAProtocolAttribute> def test_protocolSwitchingWithoutAProtocolAttribute(self): > fac, proto = self.makeProto() test_client.py:328: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:259: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:272: in prepareParsing self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS4Sender object at 0x7f9c985d3fd0>, host = '\x00\x00\x00\x01', port = 0, user = '' def sendRequest(self, host, port, user): data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port) try: host = socket.inet_pton(socket.AF_INET, host) except socket.error: host, suffix = '\0\0\0\1', host + '\0' else: suffix = '' > self.transport.write(data + host + user + '\0' + suffix) E TypeError: can't concat str to bytes ../client.py:260: TypeError _________________________________ TestSOCKS5ClientFactory.test_anonymousAndLoginAuth __________________________________ self = <txsocksx.test.test_client.TestSOCKS5ClientFactory testMethod=test_anonymousAndLoginAuth> def test_anonymousAndLoginAuth(self): > fac, proto = self.makeProto('', 0, None, methods={'anonymous': (), 'login': ()}) test_client.py:399: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:358: in makeProto fac = self.factory(*a, **kw) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c9819c128>, host = '', port = 0, proxiedFactory = None methods = {'anonymous': (), 'login': ()} def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}): if not methods: raise ValueError('no auth methods were specified') self.host = host self.port = port self.proxiedFactory = proxiedFactory self.methods = dict( (self.authMethodMap[method], value) > for method, value in methods.iteritems()) E AttributeError: 'dict' object has no attribute 'iteritems' ../client.py:180: AttributeError _________________________________ TestSOCKS5ClientFactory.test_buildingWrappedFactory _________________________________ self = <txsocksx.test.test_client.TestSOCKS5ClientFactory testMethod=test_buildingWrappedFactory> def test_buildingWrappedFactory(self): wrappedFac = FakeFactory() > fac, proto = self.makeProto('', 0, wrappedFac) test_client.py:425: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:358: in makeProto fac = self.factory(*a, **kw) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c989c4cc0>, host = '', port = 0 proxiedFactory = <txsocksx.test.test_client.FakeFactory object at 0x7f9c989c4320>, methods = {'anonymous': ()} def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}): if not methods: raise ValueError('no auth methods were specified') self.host = host self.port = port self.proxiedFactory = proxiedFactory self.methods = dict( (self.authMethodMap[method], value) > for method, value in methods.iteritems()) E AttributeError: 'dict' object has no attribute 'iteritems' ../client.py:180: AttributeError ______________________________________ TestSOCKS5ClientFactory.test_cancellation ______________________________________ self = <txsocksx.test.test_client.TestSOCKS5ClientFactory testMethod=test_cancellation> def test_cancellation(self): > fac, proto = self.makeProto('', 0, None) test_client.py:366: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:358: in makeProto fac = self.factory(*a, **kw) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c977656a0>, host = '', port = 0, proxiedFactory = None methods = {'anonymous': ()} def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}): if not methods: raise ValueError('no auth methods were specified') self.host = host self.port = port self.proxiedFactory = proxiedFactory self.methods = dict( (self.authMethodMap[method], value) > for method, value in methods.iteritems()) E AttributeError: 'dict' object has no attribute 'iteritems' ../client.py:180: AttributeError ________________________________ TestSOCKS5ClientFactory.test_cancellationAfterFailure ________________________________ self = <txsocksx.test.test_client.TestSOCKS5ClientFactory testMethod=test_cancellationAfterFailure> def test_cancellationAfterFailure(self): > fac, proto = self.makeProto('', 0, None) test_client.py:379: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:358: in makeProto fac = self.factory(*a, **kw) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c9896e0b8>, host = '', port = 0, proxiedFactory = None methods = {'anonymous': ()} def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}): if not methods: raise ValueError('no auth methods were specified') self.host = host self.port = port self.proxiedFactory = proxiedFactory self.methods = dict( (self.authMethodMap[method], value) > for method, value in methods.iteritems()) E AttributeError: 'dict' object has no attribute 'iteritems' ../client.py:180: AttributeError _______________________________ TestSOCKS5ClientFactory.test_cancellationBeforeFailure ________________________________ self = <txsocksx.test.test_client.TestSOCKS5ClientFactory testMethod=test_cancellationBeforeFailure> def test_cancellationBeforeFailure(self): > fac, proto = self.makeProto('', 0, None) test_client.py:372: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:358: in makeProto fac = self.factory(*a, **kw) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c98128940>, host = '', port = 0, proxiedFactory = None methods = {'anonymous': ()} def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}): if not methods: raise ValueError('no auth methods were specified') self.host = host self.port = port self.proxiedFactory = proxiedFactory self.methods = dict( (self.authMethodMap[method], value) > for method, value in methods.iteritems()) E AttributeError: 'dict' object has no attribute 'iteritems' ../client.py:180: AttributeError _________________________________ TestSOCKS5ClientFactory.test_clientConnectionFailed _________________________________ self = <txsocksx.test.test_client.TestSOCKS5ClientFactory testMethod=test_clientConnectionFailed> def test_clientConnectionFailed(self): > fac, proto = self.makeProto('', 0, None) test_client.py:386: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:358: in makeProto fac = self.factory(*a, **kw) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c9866e748>, host = '', port = 0, proxiedFactory = None methods = {'anonymous': ()} def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}): if not methods: raise ValueError('no auth methods were specified') self.host = host self.port = port self.proxiedFactory = proxiedFactory self.methods = dict( (self.authMethodMap[method], value) > for method, value in methods.iteritems()) E AttributeError: 'dict' object has no attribute 'iteritems' ../client.py:180: AttributeError _____________________________________ TestSOCKS5ClientFactory.test_dataSentByPeer _____________________________________ self = <txsocksx.test.test_client.TestSOCKS5ClientFactory testMethod=test_dataSentByPeer> def test_dataSentByPeer(self): wrappedFac = FakeFactory() > fac, proto = self.makeProto('', 0, wrappedFac) test_client.py:438: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:358: in makeProto fac = self.factory(*a, **kw) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c9809f1d0>, host = '', port = 0 proxiedFactory = <txsocksx.test.test_client.FakeFactory object at 0x7f9c9809fa90>, methods = {'anonymous': ()} def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}): if not methods: raise ValueError('no auth methods were specified') self.host = host self.port = port self.proxiedFactory = proxiedFactory self.methods = dict( (self.authMethodMap[method], value) > for method, value in methods.iteritems()) E AttributeError: 'dict' object has no attribute 'iteritems' ../client.py:180: AttributeError _____________________________________ TestSOCKS5ClientFactory.test_defaultFactory _____________________________________ self = <txsocksx.test.test_client.TestSOCKS5ClientFactory testMethod=test_defaultFactory> def test_defaultFactory(self): > fac, proto = self.makeProto('', 0, None) test_client.py:395: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:358: in makeProto fac = self.factory(*a, **kw) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c988a65c0>, host = '', port = 0, proxiedFactory = None methods = {'anonymous': ()} def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}): if not methods: raise ValueError('no auth methods were specified') self.host = host self.port = port self.proxiedFactory = proxiedFactory self.methods = dict( (self.authMethodMap[method], value) > for method, value in methods.iteritems()) E AttributeError: 'dict' object has no attribute 'iteritems' ../client.py:180: AttributeError _____________________________________ TestSOCKS5ClientFactory.test_justLoginAuth ______________________________________ self = <txsocksx.test.test_client.TestSOCKS5ClientFactory testMethod=test_justLoginAuth> def test_justLoginAuth(self): > fac, proto = self.makeProto('', 0, None, methods={'login': ()}) test_client.py:403: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:358: in makeProto fac = self.factory(*a, **kw) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c98355898>, host = '', port = 0, proxiedFactory = None methods = {'login': ()} def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}): if not methods: raise ValueError('no auth methods were specified') self.host = host self.port = port self.proxiedFactory = proxiedFactory self.methods = dict( (self.authMethodMap[method], value) > for method, value in methods.iteritems()) E AttributeError: 'dict' object has no attribute 'iteritems' ../client.py:180: AttributeError _______________________________________ TestSOCKS5ClientFactory.test_loginAuth ________________________________________ self = <txsocksx.test.test_client.TestSOCKS5ClientFactory testMethod=test_loginAuth> def test_loginAuth(self): > fac, proto = self.makeProto('', 0, None, methods={'login': ('spam', 'eggs')}) test_client.py:411: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:358: in makeProto fac = self.factory(*a, **kw) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c987a1780>, host = '', port = 0, proxiedFactory = None methods = {'login': ('spam', 'eggs')} def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}): if not methods: raise ValueError('no auth methods were specified') self.host = host self.port = port self.proxiedFactory = proxiedFactory self.methods = dict( (self.authMethodMap[method], value) > for method, value in methods.iteritems()) E AttributeError: 'dict' object has no attribute 'iteritems' ../client.py:180: AttributeError ___________________________________ TestSOCKS5ClientFactory.test_loginAuthAccepted ____________________________________ self = <txsocksx.test.test_client.TestSOCKS5ClientFactory testMethod=test_loginAuthAccepted> def test_loginAuthAccepted(self): > fac, proto = self.makeProto('', 0, None, methods={'login': ('spam', 'eggs')}) test_client.py:417: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:358: in makeProto fac = self.factory(*a, **kw) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c987bddd8>, host = '', port = 0, proxiedFactory = None methods = {'login': ('spam', 'eggs')} def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}): if not methods: raise ValueError('no auth methods were specified') self.host = host self.port = port self.proxiedFactory = proxiedFactory self.methods = dict( (self.authMethodMap[method], value) > for method, value in methods.iteritems()) E AttributeError: 'dict' object has no attribute 'iteritems' ../client.py:180: AttributeError ______________________________ TestSOCKS5ClientFactory.test_noProtocolFromWrappedFactory ______________________________ self = <txsocksx.test.test_client.TestSOCKS5ClientFactory testMethod=test_noProtocolFromWrappedFactory> def test_noProtocolFromWrappedFactory(self): wrappedFac = FakeFactory(returnNoProtocol=True) > fac, proto = self.makeProto('', 0, wrappedFac) test_client.py:431: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:358: in makeProto fac = self.factory(*a, **kw) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c985832b0>, host = '', port = 0 proxiedFactory = <txsocksx.test.test_client.FakeFactory object at 0x7f9c985830f0>, methods = {'anonymous': ()} def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}): if not methods: raise ValueError('no auth methods were specified') self.host = host self.port = port self.proxiedFactory = proxiedFactory self.methods = dict( (self.authMethodMap[method], value) > for method, value in methods.iteritems()) E AttributeError: 'dict' object has no attribute 'iteritems' ../client.py:180: AttributeError _________________________________ TestSOCKS4ClientFactory.test_buildingWrappedFactory _________________________________ self = <txsocksx.test.test_client.TestSOCKS4ClientFactory testMethod=test_buildingWrappedFactory> def test_buildingWrappedFactory(self): wrappedFac = FakeFactory() > fac, proto = self.makeProto('127.0.0.1', 0, wrappedFac) test_client.py:462: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:362: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:272: in prepareParsing self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS4Sender object at 0x7f9c98615400>, host = b'\x7f\x00\x00\x01', port = 0, user = '' def sendRequest(self, host, port, user): data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port) try: host = socket.inet_pton(socket.AF_INET, host) except socket.error: host, suffix = '\0\0\0\1', host + '\0' else: suffix = '' > self.transport.write(data + host + user + '\0' + suffix) E TypeError: can't concat str to bytes ../client.py:260: TypeError ______________________________________ TestSOCKS4ClientFactory.test_cancellation ______________________________________ self = <txsocksx.test.test_client.TestSOCKS4ClientFactory testMethod=test_cancellation> def test_cancellation(self): > fac, proto = self.makeProto('', 0, None) test_client.py:366: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:362: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:272: in prepareParsing self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS4Sender object at 0x7f9c97e56828>, host = '\x00\x00\x00\x01', port = 0, user = '' def sendRequest(self, host, port, user): data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port) try: host = socket.inet_pton(socket.AF_INET, host) except socket.error: host, suffix = '\0\0\0\1', host + '\0' else: suffix = '' > self.transport.write(data + host + user + '\0' + suffix) E TypeError: can't concat str to bytes ../client.py:260: TypeError ________________________________ TestSOCKS4ClientFactory.test_cancellationAfterFailure ________________________________ self = <txsocksx.test.test_client.TestSOCKS4ClientFactory testMethod=test_cancellationAfterFailure> def test_cancellationAfterFailure(self): > fac, proto = self.makeProto('', 0, None) test_client.py:379: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:362: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:272: in prepareParsing self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS4Sender object at 0x7f9c98553518>, host = '\x00\x00\x00\x01', port = 0, user = '' def sendRequest(self, host, port, user): data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port) try: host = socket.inet_pton(socket.AF_INET, host) except socket.error: host, suffix = '\0\0\0\1', host + '\0' else: suffix = '' > self.transport.write(data + host + user + '\0' + suffix) E TypeError: can't concat str to bytes ../client.py:260: TypeError _______________________________ TestSOCKS4ClientFactory.test_cancellationBeforeFailure ________________________________ self = <txsocksx.test.test_client.TestSOCKS4ClientFactory testMethod=test_cancellationBeforeFailure> def test_cancellationBeforeFailure(self): > fac, proto = self.makeProto('', 0, None) test_client.py:372: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:362: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:272: in prepareParsing self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS4Sender object at 0x7f9c98b9eda0>, host = '\x00\x00\x00\x01', port = 0, user = '' def sendRequest(self, host, port, user): data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port) try: host = socket.inet_pton(socket.AF_INET, host) except socket.error: host, suffix = '\0\0\0\1', host + '\0' else: suffix = '' > self.transport.write(data + host + user + '\0' + suffix) E TypeError: can't concat str to bytes ../client.py:260: TypeError _________________________________ TestSOCKS4ClientFactory.test_clientConnectionFailed _________________________________ self = <txsocksx.test.test_client.TestSOCKS4ClientFactory testMethod=test_clientConnectionFailed> def test_clientConnectionFailed(self): > fac, proto = self.makeProto('', 0, None) test_client.py:386: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:362: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:272: in prepareParsing self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS4Sender object at 0x7f9c976d8278>, host = '\x00\x00\x00\x01', port = 0, user = '' def sendRequest(self, host, port, user): data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port) try: host = socket.inet_pton(socket.AF_INET, host) except socket.error: host, suffix = '\0\0\0\1', host + '\0' else: suffix = '' > self.transport.write(data + host + user + '\0' + suffix) E TypeError: can't concat str to bytes ../client.py:260: TypeError _____________________________________ TestSOCKS4ClientFactory.test_dataSentByPeer _____________________________________ self = <txsocksx.test.test_client.TestSOCKS4ClientFactory testMethod=test_dataSentByPeer> def test_dataSentByPeer(self): wrappedFac = FakeFactory() > fac, proto = self.makeProto('', 0, wrappedFac) test_client.py:475: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:362: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:272: in prepareParsing self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS4Sender object at 0x7f9c97a6bdd8>, host = '\x00\x00\x00\x01', port = 0, user = '' def sendRequest(self, host, port, user): data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port) try: host = socket.inet_pton(socket.AF_INET, host) except socket.error: host, suffix = '\0\0\0\1', host + '\0' else: suffix = '' > self.transport.write(data + host + user + '\0' + suffix) E TypeError: can't concat str to bytes ../client.py:260: TypeError _____________________________________ TestSOCKS4ClientFactory.test_defaultFactory _____________________________________ self = <txsocksx.test.test_client.TestSOCKS4ClientFactory testMethod=test_defaultFactory> def test_defaultFactory(self): > fac, proto = self.makeProto('127.0.0.1', 0, None) test_client.py:449: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:362: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:272: in prepareParsing self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS4Sender object at 0x7f9c984423c8>, host = b'\x7f\x00\x00\x01', port = 0, user = '' def sendRequest(self, host, port, user): data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port) try: host = socket.inet_pton(socket.AF_INET, host) except socket.error: host, suffix = '\0\0\0\1', host + '\0' else: suffix = '' > self.transport.write(data + host + user + '\0' + suffix) E TypeError: can't concat str to bytes ../client.py:260: TypeError _____________________________________ TestSOCKS4ClientFactory.test_differentUser ______________________________________ self = <txsocksx.test.test_client.TestSOCKS4ClientFactory testMethod=test_differentUser> def test_differentUser(self): > fac, proto = self.makeProto('127.0.0.1', 0, None, 'spam') test_client.py:457: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:362: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:272: in prepareParsing self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS4Sender object at 0x7f9c97691cc0>, host = b'\x7f\x00\x00\x01', port = 0, user = 'spam' def sendRequest(self, host, port, user): data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port) try: host = socket.inet_pton(socket.AF_INET, host) except socket.error: host, suffix = '\0\0\0\1', host + '\0' else: suffix = '' > self.transport.write(data + host + user + '\0' + suffix) E TypeError: can't concat str to bytes ../client.py:260: TypeError ________________________________________ TestSOCKS4ClientFactory.test_hostname ________________________________________ self = <txsocksx.test.test_client.TestSOCKS4ClientFactory testMethod=test_hostname> def test_hostname(self): > fac, proto = self.makeProto('spam.com', 0, None) test_client.py:453: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:362: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:272: in prepareParsing self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS4Sender object at 0x7f9c98805668>, host = '\x00\x00\x00\x01', port = 0, user = '' def sendRequest(self, host, port, user): data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port) try: host = socket.inet_pton(socket.AF_INET, host) except socket.error: host, suffix = '\0\0\0\1', host + '\0' else: suffix = '' > self.transport.write(data + host + user + '\0' + suffix) E TypeError: can't concat str to bytes ../client.py:260: TypeError _______________________________________ TestSOCKS4ClientFactory.test_invalidIPs _______________________________________ self = <txsocksx.test.test_client.TestSOCKS4ClientFactory testMethod=test_invalidIPs> def test_invalidIPs(self): > self.assertRaises(ValueError, client.SOCKS4ClientFactory, '0.0.0.1', 0, None) test_client.py:482: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/trial/_synctest.py:421: in assertRaises return context._handle(lambda: f(*args, **kwargs)) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/trial/_synctest.py:315: in _handle self._returnValue = obj() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/trial/_synctest.py:331: in __exit__ self._expectedName, self._returnValue) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.test.test_client.TestSOCKS4ClientFactory testMethod=test_invalidIPs> msg = 'ValueError not raised (<txsocksx.client.SOCKS4ClientFactory object at 0x7f9c985c86d8> returned)' def fail(self, msg=None): """ Absolutely fail the test. Do not pass go, do not collect $200. @param msg: the message that will be displayed as the reason for the failure """ > raise self.failureException(msg) E twisted.trial.unittest.FailTest: ValueError not raised (<txsocksx.client.SOCKS4ClientFactory object at 0x7f9c985c86d8> returned) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/trial/_synctest.py:375: FailTest ______________________________ TestSOCKS4ClientFactory.test_noProtocolFromWrappedFactory ______________________________ self = <txsocksx.test.test_client.TestSOCKS4ClientFactory testMethod=test_noProtocolFromWrappedFactory> def test_noProtocolFromWrappedFactory(self): wrappedFac = FakeFactory(returnNoProtocol=True) > fac, proto = self.makeProto('', 0, wrappedFac) test_client.py:468: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_client.py:362: in makeProto proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:272: in prepareParsing self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS4Sender object at 0x7f9c97670e48>, host = '\x00\x00\x00\x01', port = 0, user = '' def sendRequest(self, host, port, user): data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port) try: host = socket.inet_pton(socket.AF_INET, host) except socket.error: host, suffix = '\0\0\0\1', host + '\0' else: suffix = '' > self.transport.write(data + host + user + '\0' + suffix) E TypeError: can't concat str to bytes ../client.py:260: TypeError _________________________________ TestSOCKS5ClientEndpoint.test_anonymousAndLoginAuth _________________________________ self = <txsocksx.test.test_client.TestSOCKS5ClientEndpoint testMethod=test_anonymousAndLoginAuth> def test_anonymousAndLoginAuth(self): proxy = FakeEndpoint() endpoint = client.SOCKS5ClientEndpoint('', 0, proxy, methods={'anonymous': (), 'login': ()}) > endpoint.connect(None) test_client.py:502: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../client.py:242: in connect proxyFac = SOCKS5ClientFactory(self.host, self.port, fac, self.methods) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c985d3550>, host = '', port = 0, proxiedFactory = None methods = {'anonymous': (), 'login': ()} def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}): if not methods: raise ValueError('no auth methods were specified') self.host = host self.port = port self.proxiedFactory = proxiedFactory self.methods = dict( (self.authMethodMap[method], value) > for method, value in methods.iteritems()) E AttributeError: 'dict' object has no attribute 'iteritems' ../client.py:180: AttributeError ________________________________ TestSOCKS5ClientEndpoint.test_buildingWrappedFactory _________________________________ self = <txsocksx.test.test_client.TestSOCKS5ClientEndpoint testMethod=test_buildingWrappedFactory> def test_buildingWrappedFactory(self): wrappedFac = FakeFactory() proxy = FakeEndpoint() endpoint = client.SOCKS5ClientEndpoint('', 0, proxy) > d = endpoint.connect(wrappedFac) test_client.py:519: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../client.py:242: in connect proxyFac = SOCKS5ClientFactory(self.host, self.port, fac, self.methods) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c97e9b438>, host = '', port = 0 proxiedFactory = <txsocksx.test.test_client.FakeFactory object at 0x7f9c97e9b1d0>, methods = {'anonymous': ()} def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}): if not methods: raise ValueError('no auth methods were specified') self.host = host self.port = port self.proxiedFactory = proxiedFactory self.methods = dict( (self.authMethodMap[method], value) > for method, value in methods.iteritems()) E AttributeError: 'dict' object has no attribute 'iteritems' ../client.py:180: AttributeError ________________________________ TestSOCKS5ClientEndpoint.test_clientConnectionFailed _________________________________ self = <txsocksx.test.test_client.TestSOCKS5ClientEndpoint testMethod=test_clientConnectionFailed> def test_clientConnectionFailed(self): proxy = FakeEndpoint(failure=connectionRefusedFailure) endpoint = client.SOCKS5ClientEndpoint('', 0, proxy) > d = endpoint.connect(None) test_client.py:490: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../client.py:242: in connect proxyFac = SOCKS5ClientFactory(self.host, self.port, fac, self.methods) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c9809fe80>, host = '', port = 0, proxiedFactory = None methods = {'anonymous': ()} def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}): if not methods: raise ValueError('no auth methods were specified') self.host = host self.port = port self.proxiedFactory = proxiedFactory self.methods = dict( (self.authMethodMap[method], value) > for method, value in methods.iteritems()) E AttributeError: 'dict' object has no attribute 'iteritems' ../client.py:180: AttributeError ____________________________________ TestSOCKS5ClientEndpoint.test_dataSentByPeer _____________________________________ self = <txsocksx.test.test_client.TestSOCKS5ClientEndpoint testMethod=test_dataSentByPeer> def test_dataSentByPeer(self): wrappedFac = FakeFactory() proxy = FakeEndpoint() endpoint = client.SOCKS5ClientEndpoint('', 0, proxy) > endpoint.connect(wrappedFac) test_client.py:529: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../client.py:242: in connect proxyFac = SOCKS5ClientFactory(self.host, self.port, fac, self.methods) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c97691278>, host = '', port = 0 proxiedFactory = <txsocksx.test.test_client.FakeFactory object at 0x7f9c98b60438>, methods = {'anonymous': ()} def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}): if not methods: raise ValueError('no auth methods were specified') self.host = host self.port = port self.proxiedFactory = proxiedFactory self.methods = dict( (self.authMethodMap[method], value) > for method, value in methods.iteritems()) E AttributeError: 'dict' object has no attribute 'iteritems' ../client.py:180: AttributeError ____________________________________ TestSOCKS5ClientEndpoint.test_defaultFactory _____________________________________ self = <txsocksx.test.test_client.TestSOCKS5ClientEndpoint testMethod=test_defaultFactory> def test_defaultFactory(self): proxy = FakeEndpoint() endpoint = client.SOCKS5ClientEndpoint('', 0, proxy) > endpoint.connect(None) test_client.py:496: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../client.py:242: in connect proxyFac = SOCKS5ClientFactory(self.host, self.port, fac, self.methods) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c97e861d0>, host = '', port = 0, proxiedFactory = None methods = {'anonymous': ()} def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}): if not methods: raise ValueError('no auth methods were specified') self.host = host self.port = port self.proxiedFactory = proxiedFactory self.methods = dict( (self.authMethodMap[method], value) > for method, value in methods.iteritems()) E AttributeError: 'dict' object has no attribute 'iteritems' ../client.py:180: AttributeError _____________________________________ TestSOCKS5ClientEndpoint.test_justLoginAuth _____________________________________ self = <txsocksx.test.test_client.TestSOCKS5ClientEndpoint testMethod=test_justLoginAuth> def test_justLoginAuth(self): proxy = FakeEndpoint() endpoint = client.SOCKS5ClientEndpoint('', 0, proxy, methods={'login': ()}) > endpoint.connect(None) test_client.py:508: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../client.py:242: in connect proxyFac = SOCKS5ClientFactory(self.host, self.port, fac, self.methods) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS5ClientFactory object at 0x7f9c98725780>, host = '', port = 0, proxiedFactory = None methods = {'login': ()} def __init__(self, host, port, proxiedFactory, methods={'anonymous': ()}): if not methods: raise ValueError('no auth methods were specified') self.host = host self.port = port self.proxiedFactory = proxiedFactory self.methods = dict( (self.authMethodMap[method], value) > for method, value in methods.iteritems()) E AttributeError: 'dict' object has no attribute 'iteritems' ../client.py:180: AttributeError ________________________________ TestSOCKS4ClientEndpoint.test_buildingWrappedFactory _________________________________ self = <txsocksx.test.test_client.TestSOCKS4ClientEndpoint testMethod=test_buildingWrappedFactory> def test_buildingWrappedFactory(self): wrappedFac = FakeFactory() proxy = FakeEndpoint() endpoint = client.SOCKS4ClientEndpoint('', 0, proxy) > d = endpoint.connect(wrappedFac) test_client.py:565: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../client.py:351: in connect d = self.proxyEndpoint.connect(proxyFac) util.py:28: in connect self.proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:272: in prepareParsing self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS4Sender object at 0x7f9c985e6390>, host = '\x00\x00\x00\x01', port = 0, user = '' def sendRequest(self, host, port, user): data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port) try: host = socket.inet_pton(socket.AF_INET, host) except socket.error: host, suffix = '\0\0\0\1', host + '\0' else: suffix = '' > self.transport.write(data + host + user + '\0' + suffix) E TypeError: can't concat str to bytes ../client.py:260: TypeError ____________________________________ TestSOCKS4ClientEndpoint.test_dataSentByPeer _____________________________________ self = <txsocksx.test.test_client.TestSOCKS4ClientEndpoint testMethod=test_dataSentByPeer> def test_dataSentByPeer(self): wrappedFac = FakeFactory() proxy = FakeEndpoint() endpoint = client.SOCKS4ClientEndpoint('', 0, proxy) > endpoint.connect(wrappedFac) test_client.py:575: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../client.py:351: in connect d = self.proxyEndpoint.connect(proxyFac) util.py:28: in connect self.proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:272: in prepareParsing self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS4Sender object at 0x7f9c982ab400>, host = '\x00\x00\x00\x01', port = 0, user = '' def sendRequest(self, host, port, user): data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port) try: host = socket.inet_pton(socket.AF_INET, host) except socket.error: host, suffix = '\0\0\0\1', host + '\0' else: suffix = '' > self.transport.write(data + host + user + '\0' + suffix) E TypeError: can't concat str to bytes ../client.py:260: TypeError ____________________________________ TestSOCKS4ClientEndpoint.test_defaultFactory _____________________________________ self = <txsocksx.test.test_client.TestSOCKS4ClientEndpoint testMethod=test_defaultFactory> def test_defaultFactory(self): proxy = FakeEndpoint() endpoint = client.SOCKS4ClientEndpoint('127.0.0.1', 0, proxy) > endpoint.connect(None) test_client.py:546: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../client.py:351: in connect d = self.proxyEndpoint.connect(proxyFac) util.py:28: in connect self.proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:272: in prepareParsing self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS4Sender object at 0x7f9c98447470>, host = b'\x7f\x00\x00\x01', port = 0, user = '' def sendRequest(self, host, port, user): data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port) try: host = socket.inet_pton(socket.AF_INET, host) except socket.error: host, suffix = '\0\0\0\1', host + '\0' else: suffix = '' > self.transport.write(data + host + user + '\0' + suffix) E TypeError: can't concat str to bytes ../client.py:260: TypeError _____________________________________ TestSOCKS4ClientEndpoint.test_differentUser _____________________________________ self = <txsocksx.test.test_client.TestSOCKS4ClientEndpoint testMethod=test_differentUser> def test_differentUser(self): proxy = FakeEndpoint() endpoint = client.SOCKS4ClientEndpoint('127.0.0.1', 0, proxy, 'spam') > endpoint.connect(None) test_client.py:558: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../client.py:351: in connect d = self.proxyEndpoint.connect(proxyFac) util.py:28: in connect self.proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:272: in prepareParsing self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS4Sender object at 0x7f9c98047b70>, host = b'\x7f\x00\x00\x01', port = 0, user = 'spam' def sendRequest(self, host, port, user): data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port) try: host = socket.inet_pton(socket.AF_INET, host) except socket.error: host, suffix = '\0\0\0\1', host + '\0' else: suffix = '' > self.transport.write(data + host + user + '\0' + suffix) E TypeError: can't concat str to bytes ../client.py:260: TypeError _______________________________________ TestSOCKS4ClientEndpoint.test_hostname ________________________________________ self = <txsocksx.test.test_client.TestSOCKS4ClientEndpoint testMethod=test_hostname> def test_hostname(self): proxy = FakeEndpoint() endpoint = client.SOCKS4ClientEndpoint('spam.com', 0, proxy) > endpoint.connect(None) test_client.py:552: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../client.py:351: in connect d = self.proxyEndpoint.connect(proxyFac) util.py:28: in connect self.proto.makeConnection(transport) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/internet/protocol.py:514: in makeConnection self.connectionMade() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/protocol.py:38: in connectionMade self.receiver.prepareParsing(self) ../client.py:272: in prepareParsing self.sender.sendRequest(self.factory.host, self.factory.port, self.factory.user) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.client.SOCKS4Sender object at 0x7f9c97e6bbe0>, host = '\x00\x00\x00\x01', port = 0, user = '' def sendRequest(self, host, port, user): data = struct.pack('!BBH', c.VER_SOCKS4, c.CMD_CONNECT, port) try: host = socket.inet_pton(socket.AF_INET, host) except socket.error: host, suffix = '\0\0\0\1', host + '\0' else: suffix = '' > self.transport.write(data + host + user + '\0' + suffix) E TypeError: can't concat str to bytes ../client.py:260: TypeError ______________________________________ TestSOCKS4ClientEndpoint.test_invalidIPs _______________________________________ self = <txsocksx.test.test_client.TestSOCKS4ClientEndpoint testMethod=test_invalidIPs> def test_invalidIPs(self): > self.assertRaises(ValueError, client.SOCKS4ClientEndpoint, '0.0.0.1', 0, None) test_client.py:582: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/trial/_synctest.py:421: in assertRaises return context._handle(lambda: f(*args, **kwargs)) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/trial/_synctest.py:315: in _handle self._returnValue = obj() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/trial/_synctest.py:331: in __exit__ self._expectedName, self._returnValue) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.test.test_client.TestSOCKS4ClientEndpoint testMethod=test_invalidIPs> msg = 'ValueError not raised (<txsocksx.client.SOCKS4ClientEndpoint object at 0x7f9c988a60f0> returned)' def fail(self, msg=None): """ Absolutely fail the test. Do not pass go, do not collect $200. @param msg: the message that will be displayed as the reason for the failure """ > raise self.failureException(msg) E twisted.trial.unittest.FailTest: ValueError not raised (<txsocksx.client.SOCKS4ClientEndpoint object at 0x7f9c988a60f0> returned) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/trial/_synctest.py:375: FailTest ___________________________________________ TestGrammar.test_SOCKS4Request ____________________________________________ self = <txsocksx.test.test_grammar.TestGrammar testMethod=test_SOCKS4Request> def test_SOCKS4Request(self): parse = stringParserFromRule('SOCKS4Request') > self.assertEqual(parse('\x04\x01\x01\x00\x7f\x00\x00\x01spam\x00'), ('tcp-connect', 256, '127.0.0.1', 'spam')) test_grammar.py:36: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_grammar.py:15: in parseString return getattr(grammar(s), rule)() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/parsley.py:85: in invokeRule ret, err = self._grammar.apply(name, *args) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:462: in apply val, err = self._apply(r, ruleName, args) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply [rule(), self.input]) /pymeta_generated_code/pymeta_grammar__Grammar.py:198: in rule_SOCKS4Request _G_apply_61, lastError = self._apply(self.rule_SOCKS4aHostUser, "SOCKS4aHostUser", []) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply [rule(), self.input]) /pymeta_generated_code/pymeta_grammar__Grammar.py:178: in rule_SOCKS4aHostUser _G_or_57, lastError = self._or([_G_or_44, _G_or_55]) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:598: in _or ret, err = f() /pymeta_generated_code/pymeta_grammar__Grammar.py:175: in _G_or_55 _G_apply_56, lastError = self._apply(self.rule_SOCKS4HostUser, "SOCKS4HostUser", []) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply [rule(), self.input]) /pymeta_generated_code/pymeta_grammar__Grammar.py:129: in rule_SOCKS4HostUser _G_apply_40, lastError = self._apply(self.rule_ipv4Address, "ipv4Address", []) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply [rule(), self.input]) /pymeta_generated_code/pymeta_grammar__Grammar.py:78: in rule_ipv4Address _G_python_25, lastError = eval(self._G_expr_24, self.globals, _locals), None _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E TypeError: a bytes-like object is required, not 'str' <string>:1: TypeError ___________________________________________ TestGrammar.test_SOCKS4Response ___________________________________________ self = <txsocksx.test.test_grammar.TestGrammar testMethod=test_SOCKS4Response> def test_SOCKS4Response(self): parse = stringParserFromRule('SOCKS4Response') > self.assertEqual(parse('\x00' * 8), (0, '0.0.0.0', 0)) test_grammar.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_grammar.py:15: in parseString return getattr(grammar(s), rule)() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/parsley.py:85: in invokeRule ret, err = self._grammar.apply(name, *args) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:462: in apply val, err = self._apply(r, ruleName, args) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply [rule(), self.input]) /pymeta_generated_code/pymeta_grammar__Grammar.py:221: in rule_SOCKS4Response _G_apply_67, lastError = self._apply(self.rule_ipv4Address, "ipv4Address", []) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply [rule(), self.input]) /pymeta_generated_code/pymeta_grammar__Grammar.py:78: in rule_ipv4Address _G_python_25, lastError = eval(self._G_expr_24, self.globals, _locals), None _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E TypeError: a bytes-like object is required, not 'str' <string>:1: TypeError __________________________________________ TestGrammar.test_SOCKS4aHostUser ___________________________________________ self = <txsocksx.test.test_grammar.TestGrammar testMethod=test_SOCKS4aHostUser> def test_SOCKS4aHostUser(self): parse = stringParserFromRule('SOCKS4aHostUser') > self.assertEqual(parse('\x7f\x00\x00\x01spam\x00'), ('127.0.0.1', 'spam')) test_grammar.py:22: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_grammar.py:15: in parseString return getattr(grammar(s), rule)() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/parsley.py:85: in invokeRule ret, err = self._grammar.apply(name, *args) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:462: in apply val, err = self._apply(r, ruleName, args) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply [rule(), self.input]) /pymeta_generated_code/pymeta_grammar__Grammar.py:178: in rule_SOCKS4aHostUser _G_or_57, lastError = self._or([_G_or_44, _G_or_55]) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:598: in _or ret, err = f() /pymeta_generated_code/pymeta_grammar__Grammar.py:175: in _G_or_55 _G_apply_56, lastError = self._apply(self.rule_SOCKS4HostUser, "SOCKS4HostUser", []) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply [rule(), self.input]) /pymeta_generated_code/pymeta_grammar__Grammar.py:129: in rule_SOCKS4HostUser _G_apply_40, lastError = self._apply(self.rule_ipv4Address, "ipv4Address", []) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply [rule(), self.input]) /pymeta_generated_code/pymeta_grammar__Grammar.py:78: in rule_ipv4Address _G_python_25, lastError = eval(self._G_expr_24, self.globals, _locals), None _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E TypeError: a bytes-like object is required, not 'str' <string>:1: TypeError ___________________________________________ TestGrammar.test_SOCKS5Address ____________________________________________ self = <txsocksx.test.test_grammar.TestGrammar testMethod=test_SOCKS5Address> def test_SOCKS5Address(self): parse = stringParserFromRule('SOCKS5Address') > self.assertEqual(parse('\x01\x00\x00\x00\x00'), '0.0.0.0') test_grammar.py:57: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_grammar.py:15: in parseString return getattr(grammar(s), rule)() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/parsley.py:85: in invokeRule ret, err = self._grammar.apply(name, *args) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:462: in apply val, err = self._apply(r, ruleName, args) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply [rule(), self.input]) /pymeta_generated_code/pymeta_grammar__Grammar.py:333: in rule_SOCKS5Address _G_or_103, lastError = self._or([_G_or_90, _G_or_95, _G_or_99]) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:598: in _or ret, err = f() /pymeta_generated_code/pymeta_grammar__Grammar.py:305: in _G_or_90 _G_apply_92, lastError = self._apply(self.rule_ipv4Address, "ipv4Address", []) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply [rule(), self.input]) /pymeta_generated_code/pymeta_grammar__Grammar.py:78: in rule_ipv4Address _G_python_25, lastError = eval(self._G_expr_24, self.globals, _locals), None _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E TypeError: a bytes-like object is required, not 'str' <string>:1: TypeError ________________________________________ TestGrammar.test_SOCKS5ServerResponse ________________________________________ self = <txsocksx.test.test_grammar.TestGrammar testMethod=test_SOCKS5ServerResponse> def test_SOCKS5ServerResponse(self): parse = stringParserFromRule('SOCKS5ServerResponse') self.assertEqual(parse('\x05\x00\x00\x03\x00\x00\x00'), (0, '', 0)) > self.assertEqual(parse('\x05\x01\x00\x01\x7f\x00\x00\x01\x01\x00'), (1, '127.0.0.1', 256)) test_grammar.py:83: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test_grammar.py:15: in parseString return getattr(grammar(s), rule)() /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/parsley.py:85: in invokeRule ret, err = self._grammar.apply(name, *args) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:462: in apply val, err = self._apply(r, ruleName, args) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply [rule(), self.input]) /pymeta_generated_code/pymeta_grammar__Grammar.py:379: in rule_SOCKS5ServerResponse _G_apply_113, lastError = self._apply(self.rule_SOCKS5Address, "SOCKS5Address", []) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply [rule(), self.input]) /pymeta_generated_code/pymeta_grammar__Grammar.py:333: in rule_SOCKS5Address _G_or_103, lastError = self._or([_G_or_90, _G_or_95, _G_or_99]) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:598: in _or ret, err = f() /pymeta_generated_code/pymeta_grammar__Grammar.py:305: in _G_or_90 _G_apply_92, lastError = self._apply(self.rule_ipv4Address, "ipv4Address", []) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/ometa/runtime.py:495: in _apply [rule(), self.input]) /pymeta_generated_code/pymeta_grammar__Grammar.py:78: in rule_ipv4Address _G_python_25, lastError = eval(self._G_expr_24, self.globals, _locals), None _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E TypeError: a bytes-like object is required, not 'str' <string>:1: TypeError __________________________________________ TestSOCKS5Agent.test_HTTPRequest ___________________________________________ self = <txsocksx.test.test_http.TestSOCKS5Agent testMethod=test_HTTPRequest> def test_HTTPRequest(self): > self.agent.request('GET', 'http://spam.com/eggs') test_http.py:36: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../http.py:43: in request return self._wrappedAgent.request(*a, **kw) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/client.py:1649: in request parsedURI = URI.fromBytes(uri) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/client.py:638: in fromBytes scheme, netloc, path, params, query, fragment = http.urlparse(uri) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = 'http://spam.com/eggs' def urlparse(url): """ Parse an URL into six components. This is similar to C{urlparse.urlparse}, but rejects C{unicode} input and always produces C{bytes} output. @type url: C{bytes} @raise TypeError: The given url was a C{unicode} string instead of a C{bytes}. @return: The scheme, net location, path, params, query string, and fragment of the URL - all as C{bytes}. @rtype: C{ParseResultBytes} """ if isinstance(url, unicode): > raise TypeError("url must be bytes, not unicode") E TypeError: url must be bytes, not unicode /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/http.py:181: TypeError __________________________________________ TestSOCKS5Agent.test_HTTPSRequest __________________________________________ self = <txsocksx.test.test_http.TestSOCKS5Agent testMethod=test_HTTPSRequest> def test_HTTPSRequest(self): > self.agent.request('GET', 'https://spam.com/eggs') test_http.py:45: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../http.py:43: in request return self._wrappedAgent.request(*a, **kw) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/client.py:1649: in request parsedURI = URI.fromBytes(uri) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/client.py:638: in fromBytes scheme, netloc, path, params, query, fragment = http.urlparse(uri) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = 'https://spam.com/eggs' def urlparse(url): """ Parse an URL into six components. This is similar to C{urlparse.urlparse}, but rejects C{unicode} input and always produces C{bytes} output. @type url: C{bytes} @raise TypeError: The given url was a C{unicode} string instead of a C{bytes}. @return: The scheme, net location, path, params, query string, and fragment of the URL - all as C{bytes}. @rtype: C{ParseResultBytes} """ if isinstance(url, unicode): > raise TypeError("url must be bytes, not unicode") E TypeError: url must be bytes, not unicode /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/http.py:181: TypeError __________________________________________ TestSOCKS4Agent.test_HTTP4Request __________________________________________ self = <txsocksx.test.test_http.TestSOCKS4Agent testMethod=test_HTTP4Request> def test_HTTP4Request(self): > self.agent.request('GET', 'http://127.0.0.1/eggs') test_http.py:59: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../http.py:43: in request return self._wrappedAgent.request(*a, **kw) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/client.py:1649: in request parsedURI = URI.fromBytes(uri) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/client.py:638: in fromBytes scheme, netloc, path, params, query, fragment = http.urlparse(uri) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = 'http://127.0.0.1/eggs' def urlparse(url): """ Parse an URL into six components. This is similar to C{urlparse.urlparse}, but rejects C{unicode} input and always produces C{bytes} output. @type url: C{bytes} @raise TypeError: The given url was a C{unicode} string instead of a C{bytes}. @return: The scheme, net location, path, params, query string, and fragment of the URL - all as C{bytes}. @rtype: C{ParseResultBytes} """ if isinstance(url, unicode): > raise TypeError("url must be bytes, not unicode") E TypeError: url must be bytes, not unicode /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/http.py:181: TypeError _________________________________________ TestSOCKS4Agent.test_HTTP4aRequest __________________________________________ self = <txsocksx.test.test_http.TestSOCKS4Agent testMethod=test_HTTP4aRequest> def test_HTTP4aRequest(self): > self.agent.request('GET', 'http://spam.com/eggs') test_http.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../http.py:43: in request return self._wrappedAgent.request(*a, **kw) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/client.py:1649: in request parsedURI = URI.fromBytes(uri) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/client.py:638: in fromBytes scheme, netloc, path, params, query, fragment = http.urlparse(uri) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = 'http://spam.com/eggs' def urlparse(url): """ Parse an URL into six components. This is similar to C{urlparse.urlparse}, but rejects C{unicode} input and always produces C{bytes} output. @type url: C{bytes} @raise TypeError: The given url was a C{unicode} string instead of a C{bytes}. @return: The scheme, net location, path, params, query string, and fragment of the URL - all as C{bytes}. @rtype: C{ParseResultBytes} """ if isinstance(url, unicode): > raise TypeError("url must be bytes, not unicode") E TypeError: url must be bytes, not unicode /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/http.py:181: TypeError __________________________________________ TestSOCKS4Agent.test_HTTPSRequest __________________________________________ self = <txsocksx.test.test_http.TestSOCKS4Agent testMethod=test_HTTPSRequest> def test_HTTPSRequest(self): > self.agent.request('GET', 'https://spam.com/eggs') test_http.py:77: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../http.py:43: in request return self._wrappedAgent.request(*a, **kw) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/client.py:1649: in request parsedURI = URI.fromBytes(uri) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/client.py:638: in fromBytes scheme, netloc, path, params, query, fragment = http.urlparse(uri) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ url = 'https://spam.com/eggs' def urlparse(url): """ Parse an URL into six components. This is similar to C{urlparse.urlparse}, but rejects C{unicode} input and always produces C{bytes} output. @type url: C{bytes} @raise TypeError: The given url was a C{unicode} string instead of a C{bytes}. @return: The scheme, net location, path, params, query string, and fragment of the URL - all as C{bytes}. @rtype: C{ParseResultBytes} """ if isinstance(url, unicode): > raise TypeError("url must be bytes, not unicode") E TypeError: url must be bytes, not unicode /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/web/http.py:181: TypeError _________________________________ TLSWrapClientEndpointTestCase.test_methodsAvailable _________________________________ self = <txsocksx.test.test_tls.TLSWrapClientEndpointTestCase testMethod=test_methodsAvailable> def test_methodsAvailable(self): """ Methods defined on the Protocol are accessible from the Protocol returned from connect's Deferred. """ proto = self.successResultOf(self.wrapper.connect(self.factory)) > proto.sendString('spam') test_tls.py:50: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/protocols/basic.py:163: in sendString self.transport.write(_formatNetstring(string)) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ data = 'spam' def _formatNetstring(data): > return b''.join([str(len(data)).encode("ascii"), b':', data, b',']) E TypeError: sequence item 2: expected a bytes-like object, str found /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/protocols/basic.py:30: TypeError _________________________________ TLSWrapClientEndpointTestCase.test_wrappingBehavior _________________________________ self = <txsocksx.test.test_tls.TLSWrapClientEndpointTestCase testMethod=test_wrappingBehavior> def test_wrappingBehavior(self): """ Any modifications performed by the underlying ProtocolWrapper propagate through to the wrapped Protocol. """ proto = self.successResultOf(self.wrapper.connect(self.factory)) > self.endpoint.proto.dataReceived('5:hello,') test_tls.py:41: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ util.py:35: in dataReceived policies.ProtocolWrapper.dataReceived(self, data.upper()) /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/protocols/policies.py:120: in dataReceived self.wrappedProtocol.dataReceived(data) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <txsocksx.test.test_tls.NetstringTracker object at 0x7f9c976a2550>, data = '5:HELLO,' def dataReceived(self, data): """ Receives some characters of a netstring. Whenever a complete netstring is received, this method extracts its payload and calls L{stringReceived} to process it. @param data: A chunk of data representing a (possibly partial) netstring @type data: C{bytes} """ > self._remainingData += data E TypeError: can't concat str to bytes /home/anand/virtualenvs/txsocksx/lib/python3.5/site-packages/twisted/protocols/basic.py:177: TypeError ======================================== 75 failed, 11 passed in 4.88 seconds ========================================= (txsocksx) anand@anand-HP-Pavilion-Laptop-15-cc1xx:~/projects/anvetsu/tahoe/txsocksx/txsocksx/test\ {2019-03-18 19:40:34} ```
pythonhacker commented 2019-03-18 20:12:26 +00:00
Author
Owner

After some 3 hours of head-banging got the grammar test to work. Woho...



$ pytest -x
======================================= test session starts =======================================
platform linux -- Python 3.5.6, pytest-4.3.1, py-1.8.0, pluggy-0.9.0
rootdir: /home/anand/projects/anvetsu/tahoe/txsocksx, inifile:
collected 10 items                                                                                

test_grammar.py ..........                                                                  [100%]

==================================== 10 passed in 0.16 seconds ====================================
After some 3 hours of head-banging got the grammar test to work. Woho... ``` $ pytest -x ======================================= test session starts ======================================= platform linux -- Python 3.5.6, pytest-4.3.1, py-1.8.0, pluggy-0.9.0 rootdir: /home/anand/projects/anvetsu/tahoe/txsocksx, inifile: collected 10 items test_grammar.py .......... [100%] ==================================== 10 passed in 0.16 seconds ==================================== ```
pythonhacker commented 2019-03-18 20:14:36 +00:00
Author
Owner

So the idea here would be to prepare a patch for the grammar part and send it as PR to the original project, after filing an issue, to engage the upstream earlier than later.

The grammar fixes will be backwards compatible with Python2, so it should not break his code. The problem is txsocksx hasn't been updated in like 4 years!

Should have a patch ready in a day or two.

Makes sense I hope.

So the idea here would be to prepare a patch for the grammar part and send it as PR to the original project, after filing an issue, to engage the upstream earlier than later. The grammar fixes will be backwards compatible with Python2, so it should not break his code. The problem is txsocksx hasn't been updated in like 4 years! Should have a patch ready in a day or two. Makes sense I hope.
pythonhacker commented 2019-03-18 20:19:01 +00:00
Author
Owner

Updated upstream ticket with comment -> https://github.com/habnabit/txsocksx/issues/19

Updated upstream ticket with comment -> <https://github.com/habnabit/txsocksx/issues/19>
pythonhacker commented 2019-03-20 18:38:32 +00:00
Author
Owner

Reduced unit test errors to 22 for test_client.py (from 66)

Reduced unit test errors to 22 for `test_client.py` (from 66)
pythonhacker commented 2019-03-20 18:39:57 +00:00
Author
Owner

A full patch will probably take another 1-2 days. Btw I am on a short break from tomorrow, so you may not see much updates here till March 25.

A full patch will probably take another 1-2 days. Btw I am on a short break from tomorrow, so you may not see much updates here till March 25.
pythonhacker commented 2019-06-03 09:49:29 +00:00
Author
Owner

Sorry for being away for a while. I am back now.

Ok, so today I worked for 4-5 hours after a long time and got the txsocksx unit tests passing in Python2 and 3.

(tx3) anand@anand-HP-Pavilion-Laptop-15-cc1xx:~/projects/anvetsu/tahoe/txsocksx/txsocksx/test_grammar\ {2019-06-03 15:15:12}
$ pytest
========================================================== test session starts
platform linux -- Python 3.5.6, pytest-4.3.1, py-1.8.0, pluggy-0.9.0
rootdir: /home/anand/projects/anvetsu/tahoe/txsocksx, inifile:
collected 76 items

test_client.py .................................................................. [ 86%]
test_grammar.py .......... [100%]

======================================================= 76 passed in 1.32 seconds

This does not mean txsocksx is fully ready for Python3. We will know only when the modified code is tested with foolscap.

Anyway, hopefully this update was useful.

Sorry for being away for a while. I am back now. Ok, so today I worked for 4-5 hours after a long time and got the txsocksx unit tests passing in Python2 and 3. (tx3) anand@anand-HP-Pavilion-Laptop-15-cc1xx:~/projects/anvetsu/tahoe/txsocksx/txsocksx/test_grammar\ {2019-06-03 15:15:12} $ pytest ========================================================== test session starts platform linux -- Python 3.5.6, pytest-4.3.1, py-1.8.0, pluggy-0.9.0 rootdir: /home/anand/projects/anvetsu/tahoe/txsocksx, inifile: collected 76 items test_client.py .................................................................. [ 86%] test_grammar.py .......... [100%] ======================================================= 76 passed in 1.32 seconds This does not mean txsocksx is *fully ready* for Python3. We will know only when the modified code is tested with foolscap. Anyway, hopefully this update was useful.
pythonhacker commented 2019-06-03 09:50:10 +00:00
Author
Owner

By end of tomorrow (4th June), I would have made the changes available in my own port of txsocksx with more information here.

By end of tomorrow (4th June), I would have made the changes available in my own port of txsocksx with more information here.
pythonhacker commented 2019-06-03 17:21:26 +00:00
Author
Owner

The changes are available in my fork @ https://github.com/pythonhacker/txsocksx . Only 7 more tests to be fixed now.

I expect I will be able to raise a PR with the txsocksx origin project in couple days and start working on foolscap by end of this week.

The changes are available in my fork @ <https://github.com/pythonhacker/txsocksx> . Only 7 more tests to be fixed now. I expect I will be able to raise a PR with the txsocksx origin project in couple days and start working on foolscap by end of this week.
pythonhacker commented 2019-06-04 18:29:34 +00:00
Author
Owner

All tests pass now. All changes pushed to github. Perhaps someone could verify by checking out my code and letting me know if something is not working for them.

  • Python version (3): 3.5.6
  • Python version (2): 2.7.15
All tests pass now. All changes pushed to github. Perhaps someone could verify by checking out my code and letting me know if something is not working for them. * Python version (3): 3.5.6 * Python version (2): 2.7.15
Foolscap no longer depends on txsocksx - <https://github.com/warner/foolscap/issues/37#issuecomment-570762166>
exarkun added the
somebody else's problem
label 2020-01-09 18:33:53 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#2999
No description provided.