def test_get_next_alarm_should_return_valid_values(): api = 'API(600: 3; 39)\r\n' results = LPGAN_API_Rx.get_next_alarm(api) assert 3 == results['alarm_id'] assert 39 == results['seconds_left_until_alarm']
def test_get_next_alarm_should_raise_exception_for_error(): with pytest.raises(ValueError): LPGAN_API_Rx.get_next_alarm('API(225)')