コード例 #1
0
 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
コード例 #2
0
 def test_connect(self):
     with self.test_server as port:
         client = IQConnectSocketClient( ('localhost', port) )
         client.connect()
         client.disconnect()