Ejemplo n.º 1
0
 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")
Ejemplo n.º 2
0
 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")