def test_QOTD(self): """ Test wire.QOTD protocol. """ t = proto_helpers.StringTransport() a = wire.QOTD() a.makeConnection(t) self.assertEqual(t.value(), b"An apple a day keeps the doctor away.\r\n")
def testQOTD(self): """ Test wire.QOTD protocol. """ t = StringIOWithoutClosing() a = wire.QOTD() a.makeConnection(protocol.FileWrapper(t)) self.failUnlessEqual(t.getvalue(), "An apple a day keeps the doctor away.\r\n")