def test_send(self): with self.test_server as port: client = IQConnectSocketClient( ('localhost', port) ) client.connect() client.send("Test message!") client.disconnect() self.assertEquals(self.test_server.read(), "Test message!\n") # Newline added by PyQFeed
def test_connect(self): with self.test_server as port: client = IQConnectSocketClient( ('localhost', port) ) client.connect() client.disconnect()