def _versionTest(self, serverVersionResponse): """ Test L{DispatchClient} version negotiation. """ client = msn.DispatchClient() client.userHandle = "foo" transport = StringTransport() client.makeConnection(transport) self.assertEqual(transport.value(), "VER 1 MSNP8 CVR0\r\n") transport.clear() client.dataReceived(serverVersionResponse) self.assertEqual( transport.value(), "CVR 2 0x0409 win 4.10 i386 MSNMSGR 5.0.0544 MSMSGS foo\r\n")
def _versionTest(self, serverVersionResponse): """ Test L{DispatchClient} version negotiation. """ client = msn.DispatchClient() client.userHandle = "foo" transport = StringTransport() client.makeConnection(transport) self.assertEquals( transport.value(), "VER 1 MSNP8 CVR0\r\n") transport.clear() client.dataReceived(serverVersionResponse) self.assertEquals( transport.value(), "CVR 2 0x0409 win 4.10 i386 MSNMSGR 5.0.0544 MSMSGS foo\r\n")