def test_hp_dc7900(lshw: MagicMock): """Tests an HP DC 7900 with an erased HDD following HMG IS5.""" # todo check totalSlots and usedSlots pc, components = computer(lshw, 'erased-i5.lshw') assert len(components['Processor']) == 1 assert pc['@type'] == 'Computer' assert has_ram(components), 'Computer without RAM' assert len(components['GraphicCard']) == 1
def test_xeon(lshw: MagicMock): pc, components = computer(lshw, 'xeon') assert 'HardDrive' not in components assert has_ram(components), 'Computer without RAM' assert len(components['GraphicCard']) == 2 ram0, ram1 = components['GraphicCard'] assert ram0['serialNumber'] is ram1['serialNumber'] is None assert ram0['model'] == 'GT200GL Quadro FX 3800' assert ram1['model'] == 'GF100GL Quadro 4000' assert ram0['manufacturer'] == ram1['manufacturer'] == 'NVIDIA Corporation'
def test_eee_pc(lshw: MagicMock): pc, components = computer(lshw, 'eee-pc') assert len(components['Processor']) == 1 assert has_ram(components) assert pc[ 'model'] == '1000H', 'Model has noise enclosed between parenthesis' assert pc['serialNumber'] == '8BOAAQ191999' assert pc['type'] == 'Netbook' assert pc['@type'] == 'Computer' assert len(components['GraphicCard']) == 1
def test_xiaomi(lshw: MagicMock): pc, components = computer(lshw, 'xiaomi') assert len(components['Processor']) == 1 assert has_ram(components), 'Computer without RAM' assert len(components['GraphicCard']) == 2 ram0, ram1 = components['GraphicCard'] assert ram0['model'] == 'Sky Lake Integrated Graphics' assert ram0['serialNumber'] is None assert ram0['manufacturer'] == 'Intel Corporation' assert ram1['model'] == 'NVIDIA Corporation' assert ram1['serialNumber'] is None assert ram1['manufacturer'] == 'NVIDIA Corporation'
def test_dell(lshw: MagicMock): pc, components = computer(lshw, 'dell-logicalname-network') assert len(components['Processor']) == 1 assert has_ram(components), 'Computer without RAM' assert len(components['GraphicCard']) == 1
def test_pc_laudem(lshw: MagicMock): # todo fix pc, components = computer(lshw, 'pc-laudem') assert len(components['Processor']) == 1 assert has_ram(components), 'Computer without RAM' assert len(components['GraphicCard']) == 1
def test_lenovo(lshw: MagicMock): pc, components = computer(lshw, 'lenovo') assert len(components['Processor']) == 1 assert has_ram(components), 'Computer without RAM'