On Fri, 2011-07-01 at 19:11 +0530, Anshul Singhle wrote:

>      def test_1(self):
>          def got_data(data):
>              self.assertEquals(data,"a")
>          d = protocol.ClientCreator(reactor,
> SimpleTransport).connectTCP('localhost', self.server.getHost().port)
>          d.addCallback(got_data)
>          return d

ClientCreator.connectTCP returns a Deferred that fires with a Protocol
instance (in this case, a SimpleTransport instance), which you are then
comparing with a string in got_data(). This fails, as one would expect.


_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to