def testHardwareExtendedInventory(hardwareConfigAndHardwareInfo):
    config, hardwareInfo = hardwareConfigAndHardwareInfo
    result = Posix.hardwareExtendedInventory(config, hardwareInfo)

    expected = {
        'COMPUTER_SYSTEM': [{
            'dellexpresscode': None,
            'description': 'Desktop Computer',
            'model': 'OptiPlex 755',
            'name': 'de-sie-gar-hk01',
            'serialNumber': '',
            'systemType': 'desktop',
            'totalPhysicalMemory': '2147483648',
            'vendor': 'Dell Inc.'
        }]
    }
    assert {} != result
    assert expected == result
def testHardwareExtendedInventoryReturnsSafelyWithoutConfig(
        hardwareConfigAndHardwareInfo):
    config, hardwareInfo = hardwareConfigAndHardwareInfo
    assert {} == Posix.hardwareExtendedInventory({}, hardwareInfo)