I have to write tests for a custom conch server. My approach is to make a
test client and then connect it to my server in my testcase. I have been
able to create a client that can interface with my server, but i'm not able
to do it from within the test case.
What I'm trying is :
ssh_server = Server()
self.server = reactor.listenTCP(ssh_server.port,
server, self.server = self.server,None
d = protocol.ClientCreator(reactor,
The transport SimpleTransport is my custom transport.SSHClientTransport
instance. The class Server() is a wrapper around an SSHFactory insatance.
The problem I'm facing is that after this line >
d = protocol.ClientCreator(reactor, SimpleTransport).connectTCP('localhost',
I have to write reactor.run(), otherwise the client is not starting. If I
write reactor.run() the test doesn't stop (understandable since the reactor
isn't being stopped).
Basically I want to know how I can start the client without running
Thanks in Advance!!