Did I find the right examples for you? yes no

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)

src/c/l/cloudbase-init-HEAD/cloudbaseinit/tests/utils/test_log.py   cloudbase-init(Download)
    def setUp(self, mock_Serial):
        CONF.set_override('logging_serial_port_settings', "COM1,115200,N,8")
        self._serial_port_handler = log.SerialPortHandler()
        self._serial_port_handler._port = mock.MagicMock()
 
    @mock.patch('serial.Serial')
    def test_init(self, mock_Serial):
        mock_Serial().isOpen.return_value = False
        log.SerialPortHandler()