def gw(): gw = uart.Gateway(mock.MagicMock()) gw._transport = mock.MagicMock() return gw
def uart_gw(): gw = MagicMock(auto_spec=uart.Gateway(MagicMock())) return gw