'Test the port is connected at initialization time, and
C{Protocol.makeConnection} has been called on the desired protocol.'

def test_serialPortInitiallyConnected(self):

    self.assertEqual(0, self.protocol.connected)
    port = RegularFileSerialPort(self.protocol, self.path, self.reactor)
    self.assertEqual(1, port.connected)
    self.assertEqual(1, self.protocol.connected)
    self.assertEqual(port, self.protocol.transport)
    port.connectionLost(Failure(Exception('Cleanup')))
