| | 370 | def testTCP6(self): |
| | 371 | s = service.MultiService() |
| | 372 | s.startService() |
| | 373 | factory = protocol.ServerFactory() |
| | 374 | factory.protocol = TestEcho |
| | 375 | TestEcho.d = defer.Deferred() |
| | 376 | t = internet.TCP6Server(0, factory) |
| | 377 | t.setServiceParent(s) |
| | 378 | num = t._port.getHost().port |
| | 379 | factory = protocol.ClientFactory() |
| | 380 | factory.d = defer.Deferred() |
| | 381 | factory.protocol = Foo |
| | 382 | factory.line = None |
| | 383 | internet.TCP6Client('::', num, factory).setServiceParent(s) |
| | 384 | factory.d.addCallback(self.assertEqual, 'lalala') |
| | 385 | factory.d.addCallback(lambda x : s.stopService()) |
| | 386 | factory.d.addCallback(lambda x : TestEcho.d) |
| | 387 | return factory.d |
| | 388 | |