[Twisted-Python] Writing unit test for SOCKS5 client

Dmitry Litovchenko kwaker at uch.net
Fri Feb 14 19:33:28 EST 2003

I am currently writing SOCKS5 client, which in case of success will
grow into set of [SOCKS4, SOCKS5, HTTP Proxy Tunnel] clients, but to
have my code added to Twisted codebase I was requested to create unit
tests for it.

The question is what points should I test and how in my units. Is
sending RFC1928 (SOCKS5 protocol RFC) compliant messages to Protocol
class and checking replies enough?

If test case tries to connect to SOCKS server how can I fool it and
simulate RFC-compliant socks server? The smallest test case module
easy to understand was for POP3 (5 kbytes) and it tested server but
not client.

Best regards,
 Dmitry                          mailto:kwaker at uch.net

More information about the Twisted-Python mailing list