fixing tests csv exports
This commit is contained in:
parent
a9947fd93f
commit
324aceb04e
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,162 @@
|
|||
{
|
||||
"components": [
|
||||
{
|
||||
"type": "NetworkAdapter",
|
||||
"model": "AR9285 Wireless Network Adapter",
|
||||
"serialNumber": "74:2f:68:8b:fd:c9",
|
||||
"manufacturer": "Qualcomm Atheros",
|
||||
"wireless": true,
|
||||
"actions": []
|
||||
},
|
||||
{
|
||||
"type": "NetworkAdapter",
|
||||
"model": "AR8152 v2.0 Fast Ethernet",
|
||||
"serialNumber": "14:da:e9:42:f6:7b",
|
||||
"manufacturer": "Qualcomm Atheros",
|
||||
"speed": 100,
|
||||
"wireless": false,
|
||||
"actions": []
|
||||
},
|
||||
{
|
||||
"type": "Processor",
|
||||
"cores": 1,
|
||||
"threads": 1,
|
||||
"address": 64,
|
||||
"model": "Intel Atom CPU N455 @ 2.66GHz",
|
||||
"serialNumber": null,
|
||||
"manufacturer": "Intel Corp.",
|
||||
"speed": 2.667,
|
||||
"actions": [
|
||||
{
|
||||
"type": "BenchmarkProcessorSysbench",
|
||||
"rate": 164.0803,
|
||||
"elapsed": 164
|
||||
},
|
||||
{
|
||||
"type": "BenchmarkProcessor",
|
||||
"rate": 6666.24,
|
||||
"elapsed": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "GraphicCard",
|
||||
"model": "Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller",
|
||||
"serialNumber": null,
|
||||
"memory": 256.0,
|
||||
"manufacturer": "Intel Corporation",
|
||||
"actions": []
|
||||
},
|
||||
{
|
||||
"type": "SoundCard",
|
||||
"model": "NM10/ICH7 Family High Definition Audio Controller",
|
||||
"serialNumber": null,
|
||||
"manufacturer": "Intel Corporation",
|
||||
"actions": []
|
||||
},
|
||||
{
|
||||
"type": "SoundCard",
|
||||
"model": "USB 2.0 UVC VGA WebCam",
|
||||
"serialNumber": "0x0001",
|
||||
"manufacturer": "Azurewave",
|
||||
"actions": []
|
||||
},
|
||||
{
|
||||
"type": "RamModule",
|
||||
"format": "DIMM",
|
||||
"model": null,
|
||||
"size": 1024,
|
||||
"interface": "DDR2",
|
||||
"serialNumber": null,
|
||||
"manufacturer": null,
|
||||
"speed": 667.0,
|
||||
"actions": []
|
||||
},
|
||||
{
|
||||
"type": "HardDrive",
|
||||
"model": "HTS54322",
|
||||
"size": 238475,
|
||||
"interface": "ATA",
|
||||
"serialNumber": "E2024242CV86MM",
|
||||
"manufacturer": "Hitachi",
|
||||
"actions": [
|
||||
{
|
||||
"type": "BenchmarkDataStorage",
|
||||
"elapsed": 16,
|
||||
"writeSpeed": 21.8,
|
||||
"readSpeed": 66.2
|
||||
},
|
||||
{
|
||||
"type": "TestDataStorage",
|
||||
"length": "Short",
|
||||
"elapsed": 2,
|
||||
"severity": "Error",
|
||||
"status": "Unspecified Error. Self-test not started."
|
||||
},
|
||||
{
|
||||
"type": "EraseBasic",
|
||||
"steps": [
|
||||
{
|
||||
"type": "StepRandom",
|
||||
"startTime": "2018-07-03T09:15:22.257059+00:00",
|
||||
"severity": "Info",
|
||||
"endTime": "2018-07-03T10:32:11.843190+00:00"
|
||||
}
|
||||
],
|
||||
"startTime": "2018-07-03T09:15:22.256074+00:00",
|
||||
"severity": "Info",
|
||||
|
||||
"endTime": "2018-07-03T10:32:11.848455+00:00"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "Motherboard",
|
||||
"serial": 1,
|
||||
"firewire": 0,
|
||||
"model": "1001PXD",
|
||||
"slots": 2,
|
||||
"pcmcia": 0,
|
||||
"serialNumber": "Eee0123456720",
|
||||
"usb": 5,
|
||||
"manufacturer": "ASUSTeK Computer INC.",
|
||||
"actions": [
|
||||
{
|
||||
"type": "TestBios",
|
||||
"accessRange": "C"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"elapsed": 4875,
|
||||
"uuid": "c058e8d2-fb92-47cb-a4b7-522b75561135",
|
||||
"version": "11.0a2",
|
||||
"type": "Snapshot",
|
||||
"software": "Workbench",
|
||||
"endTime": "2018-07-03T09:10:57.034598+00:00",
|
||||
"device": {
|
||||
"type": "Laptop",
|
||||
"model": "1001PXD",
|
||||
"serialNumber": "B8OAAS048285",
|
||||
"manufacturer": "ASUSTeK Computer INC.",
|
||||
"chassis": "Netbook",
|
||||
"actions": [
|
||||
{
|
||||
"type": "BenchmarkRamSysbench",
|
||||
"rate": 15.7188,
|
||||
"elapsed": 16
|
||||
},
|
||||
{
|
||||
"type": "StressTest",
|
||||
"severity": "Info",
|
||||
"elapsed": 60
|
||||
},
|
||||
{
|
||||
"appearanceRange": "B",
|
||||
"functionalityRange": "A",
|
||||
"type": "VisualTest"
|
||||
}
|
||||
]
|
||||
},
|
||||
"closed": false
|
||||
}
|
|
@ -269,11 +269,11 @@ def test_export_basic_snapshot(user: UserClient):
|
|||
|
||||
assert fixture_csv[0] == export_csv[0], 'Headers are not equal'
|
||||
assert (
|
||||
fixture_csv[1][:19] == export_csv[1][:19]
|
||||
fixture_csv[1][:29] == export_csv[1][:29]
|
||||
), 'Computer information are not equal'
|
||||
assert fixture_csv[1][20] == export_csv[1][20], 'Computer information are not equal'
|
||||
assert fixture_csv[1][30] == export_csv[1][30], 'Computer information are not equal'
|
||||
assert (
|
||||
fixture_csv[1][22:] == export_csv[1][22:]
|
||||
fixture_csv[1][32:] == export_csv[1][32:]
|
||||
), 'Computer information are not equal'
|
||||
|
||||
|
||||
|
@ -339,38 +339,38 @@ def test_export_extended(app: Devicehub, user: UserClient):
|
|||
|
||||
assert fixture_csv[0] == export_csv[0], 'Headers are not equal'
|
||||
assert (
|
||||
fixture_csv[1][:19] == export_csv[1][:19]
|
||||
fixture_csv[1][:29] == export_csv[1][:29]
|
||||
), 'Computer information are not equal'
|
||||
assert fixture_csv[1][20] == export_csv[1][20], 'Computer information are not equal'
|
||||
assert fixture_csv[1][30] == export_csv[1][30], 'Computer information are not equal'
|
||||
assert (
|
||||
fixture_csv[1][22:83] == export_csv[1][22:83]
|
||||
fixture_csv[1][32:93] == export_csv[1][32:93]
|
||||
), 'Computer information are not equal'
|
||||
assert fixture_csv[1][84] == export_csv[1][84], 'Computer information are not equal'
|
||||
assert fixture_csv[1][94] == export_csv[1][94], 'Computer information are not equal'
|
||||
assert (
|
||||
fixture_csv[1][87:] == export_csv[1][87:]
|
||||
fixture_csv[1][97:] == export_csv[1][97:]
|
||||
), 'Computer information are not equal'
|
||||
assert (
|
||||
fixture_csv[2][:19] == export_csv[2][:19]
|
||||
fixture_csv[2][:29] == export_csv[2][:29]
|
||||
), 'Computer information are not equal'
|
||||
assert fixture_csv[2][20] == export_csv[2][20], 'Computer information are not equal'
|
||||
assert fixture_csv[2][30] == export_csv[2][30], 'Computer information are not equal'
|
||||
assert (
|
||||
fixture_csv[2][22:83] == export_csv[2][22:83]
|
||||
fixture_csv[2][32:93] == export_csv[2][32:93]
|
||||
), 'Computer information are not equal'
|
||||
assert fixture_csv[2][84] == export_csv[2][84], 'Computer information are not equal'
|
||||
assert fixture_csv[2][94] == export_csv[2][94], 'Computer information are not equal'
|
||||
assert (
|
||||
fixture_csv[2][87:107] == export_csv[2][87:107]
|
||||
fixture_csv[2][97:107] == export_csv[2][97:107]
|
||||
), 'Computer information are not equal'
|
||||
assert (
|
||||
fixture_csv[2][110] == export_csv[2][110]
|
||||
fixture_csv[2][120] == export_csv[2][120]
|
||||
), 'Computer information are not equal'
|
||||
assert (
|
||||
fixture_csv[2][113:134] == export_csv[2][113:134]
|
||||
fixture_csv[2][123:144] == export_csv[2][123:144]
|
||||
), 'Computer information are not equal'
|
||||
assert (
|
||||
fixture_csv[2][136] == export_csv[2][136]
|
||||
fixture_csv[2][146] == export_csv[2][146]
|
||||
), 'Computer information are not equal'
|
||||
assert (
|
||||
fixture_csv[2][139:] == export_csv[2][139:]
|
||||
fixture_csv[2][149:] == export_csv[2][149:]
|
||||
), 'Computer information are not equal'
|
||||
|
||||
|
||||
|
|
|
@ -223,16 +223,17 @@ def test_export_devices(user3: UserClientFlask):
|
|||
|
||||
assert fixture_csv[0] == export_csv[0], 'Headers are not equal'
|
||||
assert (
|
||||
fixture_csv[1][:19] == export_csv[1][:19]
|
||||
fixture_csv[1][:29] == export_csv[1][:29]
|
||||
), 'Computer information are not equal'
|
||||
assert fixture_csv[1][20] == export_csv[1][20], 'Computer information are not equal'
|
||||
assert fixture_csv[1][30] == export_csv[1][30], 'Computer information are not equal'
|
||||
# import pdb; pdb.set_trace()
|
||||
assert (
|
||||
fixture_csv[1][22:83] == export_csv[1][22:83]
|
||||
fixture_csv[1][32:93] == export_csv[1][32:93]
|
||||
), 'Computer information are not equal'
|
||||
|
||||
assert fixture_csv[1][84] == export_csv[1][84], 'Computer information are not equal'
|
||||
assert fixture_csv[1][94] == export_csv[1][94], 'Computer information are not equal'
|
||||
assert (
|
||||
fixture_csv[1][88:] == export_csv[1][88:]
|
||||
fixture_csv[1][98:] == export_csv[1][98:]
|
||||
), 'Computer information are not equal'
|
||||
|
||||
|
||||
|
@ -1660,7 +1661,7 @@ def test_export_lots(user3: UserClientFlask):
|
|||
@pytest.mark.usefixtures(conftest.app_context.__name__)
|
||||
def test_export_snapshot_json(user3: UserClientFlask):
|
||||
|
||||
file_name = 'real-eee-1001pxd.snapshot.12.json'
|
||||
file_name = 'real-eee-1001pxd.snapshot.13.json'
|
||||
snap = create_device(user3, file_name)
|
||||
|
||||
snapshot = conftest.yaml2json(file_name.split(".json")[0])
|
||||
|
|
Reference in New Issue