Esempio n. 1
0
def h150iProXTDevice():
    description = 'Mock H150i Pro XT'
    kwargs = {'fan_count': 3, 'fan_leds': 0}
    device = _MockHydroPlatinumDevice()
    dev = HydroPlatinum(device, description, **kwargs)

    runtime_storage = MockRuntimeStorage(key_prefixes='testing')
    runtime_storage.store('leds_enabled', 0)

    dev.connect(runtime_storage=runtime_storage)

    return dev
def h115iPlatinumDevice():
    description = 'Mock H115i Platinum'
    kwargs = {'fan_count': 2, 'rgb_fans': True}
    device = _H115iPlatinumDevice()
    dev = HydroPlatinum(device, description, **kwargs)

    runtime_storage = MockRuntimeStorage(key_prefixes='testing')
    runtime_storage.store('leds_enabled', 0)

    dev.connect(runtime_storage=runtime_storage)

    return dev
Esempio n. 3
0
def mockLegacy690LcDevice():
    device = MockPyusbDevice(vendor_id=0xffff,
                             product_id=0xb200,
                             bus=1,
                             port=(1, ))
    dev = Legacy690Lc(device, 'Mock Legacy 690LC')

    runtime_storage = MockRuntimeStorage(key_prefixes=['testing'])
    runtime_storage.store('leds_enabled', 0)

    dev.connect(runtime_storage=runtime_storage)
    return dev
Esempio n. 4
0
def h100iPlatinumSeDevice():
    description = 'Mock H100i Platinum SE'
    kwargs = {'fan_count': 2, 'fan_leds': 16}
    device = _MockHydroPlatinumDevice()
    dev = HydroPlatinum(device, description, **kwargs)

    runtime_storage = MockRuntimeStorage(key_prefixes=['testing'])
    runtime_storage.store('leds_enabled', 0)

    dev.connect(runtime_storage=runtime_storage)

    return dev
Esempio n. 5
0
def lightingNodeCoreDevice():
    device = MockHidapiDevice(vendor_id=0x1b1c,
                              product_id=0x0c1a,
                              address='addr')
    node = CommanderPro(device, 'Corsair Lighting Node Core', 0, 0, 1)
    runtime_storage = MockRuntimeStorage(key_prefixes=['testing'])
    node.connect(runtime_storage=runtime_storage)
    return node
Esempio n. 6
0
def commanderProDevice():
    device = MockHidapiDevice(vendor_id=0x1b1c,
                              product_id=0x0c10,
                              address='addr')
    pro = CommanderPro(device, 'Corsair Commander Pro (experimental)', 6, 4, 2)
    pro.connect()
    pro._data = MockRuntimeStorage(key_prefixes='testing')
    return pro
Esempio n. 7
0
def commanderProDevice():
    device = MockHidapiDevice(vendor_id=0x1b1c,
                              product_id=0x0c10,
                              address='addr')
    pro = CommanderPro(device, 'Corsair Commander Pro', 6, 4, 2)

    runtime_storage = MockRuntimeStorage(key_prefixes=['testing'])
    pro.connect(runtime_storage=runtime_storage)
    return pro
Esempio n. 8
0
def lightingNodeProDevice():
    device = MockHidapiDevice(vendor_id=0x1b1c,
                              product_id=0x0c0b,
                              address='addr')
    node = CommanderPro(device, 'Corsair Lighting Node Pro (experimental)', 0,
                        0, 2)
    node.connect()
    node._data = MockRuntimeStorage(key_prefixes='testing')
    return node
Esempio n. 9
0
def test_sequence_numbers_are_correctly_generated():
    runtime_storage = MockRuntimeStorage(key_prefixes='testing')
    sequence = _sequence(runtime_storage)

    for i in range(1, 32):
        assert next(sequence) == i

    for i in range(1, 32):
        assert next(sequence) == i