| 2441 | self.expect(Event.TRANSPORT_HEAD_CLOSED, Event.TRANSPORT_CLOSED) |
| 2442 | |
| 2443 | def testTransportCLOSED(self): |
| 2444 | c = Connection() |
| 2445 | c.collect(self.collector) |
| 2446 | self.expect(Event.CONNECTION_INIT) |
| 2447 | t = Transport() |
| 2448 | t.bind(c) |
| 2449 | c.open() |
| 2450 | |
| 2451 | self.expect(Event.CONNECTION_BOUND, Event.CONNECTION_LOCAL_OPEN, Event.TRANSPORT) |
| 2452 | |
| 2453 | c2 = Connection() |
| 2454 | t2 = Transport() |
| 2455 | t2.bind(c2) |
| 2456 | c2.open() |
| 2457 | c2.close() |
| 2458 | |
| 2459 | pump(t, t2) |
| 2460 | |
| 2461 | self.expect(Event.CONNECTION_REMOTE_OPEN, Event.CONNECTION_REMOTE_CLOSE, |
| 2462 | Event.TRANSPORT_TAIL_CLOSED) |
| 2463 | |
| 2464 | c.close() |
| 2465 | |
| 2466 | pump(t, t2) |
| 2467 | |
| 2468 | self.expect(Event.CONNECTION_LOCAL_CLOSE, Event.TRANSPORT, |
| 2469 | Event.TRANSPORT_HEAD_CLOSED, Event.TRANSPORT_CLOSED) |
| 2470 | |
| 2471 | def testLinkDetach(self): |
| 2472 | c1 = Connection() |