def test_pid(self): """ Should have the same pid as the transport. """ p = Channel3Protocol('joe', None, MagicMock()) self.assertEqual(p.pid, None) t = StringTransport() t.pid = 23 p.makeConnection(t) self.assertEqual(p.pid, 23)