Beispiel #1
0
def test_to_request_function_lamp_test():
    req = SetFruLedStateReq()
    led = LedState(fru_id=1, led_id=2, color=LedState.COLOR_RED)
    led.override_function = led.FUNCTION_LAMP_TEST
    led.lamp_test_duration = 3
    led.to_request(req)

    eq_(req.color, LedState.COLOR_RED)
    eq_(req.led_function, 0xfb)
    eq_(req.on_duration, 3)
Beispiel #2
0
def test_to_request_function_lamp_test():
    req = SetFruLedStateReq()
    led = LedState(fru_id=1, led_id=2, color=LedState.COLOR_RED)
    led.override_function = led.FUNCTION_LAMP_TEST
    led.lamp_test_duration = 3
    led.to_request(req)

    eq_(req.color, LedState.COLOR_RED)
    eq_(req.led_function, 0xfb)
    eq_(req.on_duration, 3)