Esempio 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")
Esempio 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")