How to use the rak811.rak811.Reset function in rak811

To help you get started, we’ve selected a few rak811 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github AmedeeBulle / pyrak811 / tests / test_rak811.py View on Github external
def test_reset_lora(mock_send, mock_hard_reset, lora):
    """Test reset lora command."""
    lora.reset(Reset.LoRa)
    mock_send.assert_called_once_with('reset=1')
    mock_hard_reset.assert_not_called()
github AmedeeBulle / pyrak811 / tests / test_cli.py View on Github external
def test_reset_lora(runner, mock_rak811):
    result = runner.invoke(cli, ['-v', 'reset', 'lora'])
    mock_rak811.return_value.reset.assert_called_once_with(Reset.LoRa)
    assert result.output.startswith('LoRa reset')