Add rates to dummy computers

This commit is contained in:
Xavier Bustamante Talavera 2018-10-23 16:24:26 +02:00
parent 10c73a4e75
commit 3978e606fd
6 changed files with 50 additions and 2 deletions

View File

@ -17,6 +17,12 @@
"elapsed": 19, "elapsed": 19,
"rate": 19.3106, "rate": 19.3106,
"type": "BenchmarkRamSysbench" "type": "BenchmarkRamSysbench"
},
{
"appearanceRange": "A",
"biosRange": "A",
"functionalityRange": "A",
"type": "WorkbenchRate"
} }
], ],
"manufacturer": "ASUSTeK Computer INC." "manufacturer": "ASUSTeK Computer INC."

View File

@ -12,6 +12,12 @@
"error": false, "error": false,
"type": "StressTest", "type": "StressTest",
"elapsed": 60 "elapsed": 60
},
{
"appearanceRange": "A",
"biosRange": "A",
"functionalityRange": "A",
"type": "WorkbenchRate"
} }
], ],
"type": "Desktop", "type": "Desktop",

View File

@ -14,6 +14,12 @@
"rate": 0.9323, "rate": 0.9323,
"elapsed": 1, "elapsed": 1,
"type": "BenchmarkRamSysbench" "type": "BenchmarkRamSysbench"
},
{
"appearanceRange": "B",
"biosRange": "A",
"functionalityRange": "C",
"type": "WorkbenchRate"
} }
], ],
"type": "Desktop", "type": "Desktop",

View File

@ -145,6 +145,12 @@
"type": "StressTest", "type": "StressTest",
"error": false, "error": false,
"elapsed": 60 "elapsed": 60
},
{
"appearanceRange": "B",
"biosRange": "C",
"functionalityRange": "A",
"type": "WorkbenchRate"
} }
] ]
}, },

View File

@ -148,6 +148,12 @@
"rate": 0.9759, "rate": 0.9759,
"type": "BenchmarkRamSysbench", "type": "BenchmarkRamSysbench",
"elapsed": 1 "elapsed": 1
},
{
"appearanceRange": "B",
"biosRange": "A",
"functionalityRange": "D",
"type": "WorkbenchRate"
} }
], ],
"serialNumber": "CZC0408YJG", "serialNumber": "CZC0408YJG",

View File

@ -142,6 +142,9 @@ def test_real_hp_11(user: UserClient):
assert pc['hid'] == 'hewlett-packard-czc0408yjg-hp_compaq_8100_elite_sff' assert pc['hid'] == 'hewlett-packard-czc0408yjg-hp_compaq_8100_elite_sff'
assert pc['chassis'] == 'Tower' assert pc['chassis'] == 'Tower'
assert set(e['type'] for e in snapshot['events']) == { assert set(e['type'] for e in snapshot['events']) == {
'EreusePrice',
'AggregateRate',
'WorkbenchRate',
'BenchmarkDataStorage', 'BenchmarkDataStorage',
'BenchmarkProcessor', 'BenchmarkProcessor',
'BenchmarkProcessorSysbench', 'BenchmarkProcessorSysbench',
@ -149,11 +152,12 @@ def test_real_hp_11(user: UserClient):
'BenchmarkRamSysbench', 'BenchmarkRamSysbench',
'StressTest' 'StressTest'
} }
assert len(list(e['type'] for e in snapshot['events'])) == 6 assert len(list(e['type'] for e in snapshot['events'])) == 9
assert pc['networkSpeeds'] == [1000, None], 'Device has no WiFi' assert pc['networkSpeeds'] == [1000, None], 'Device has no WiFi'
assert pc['processorModel'] == 'intel core i3 cpu 530 @ 2.93ghz' assert pc['processorModel'] == 'intel core i3 cpu 530 @ 2.93ghz'
assert pc['ramSize'] == 8192 assert pc['ramSize'] == 8192
assert pc['dataStorageSize'] == 305245 assert pc['dataStorageSize'] == 305245
# todo check rating
def test_real_toshiba_11(user: UserClient): def test_real_toshiba_11(user: UserClient):
@ -177,6 +181,20 @@ def test_snapshot_real_eee_1001pxd(user: UserClient):
assert pc['hid'] == 'asustek_computer_inc-b8oaas048286-1001pxd' assert pc['hid'] == 'asustek_computer_inc-b8oaas048286-1001pxd'
assert pc['tags'] == [] assert pc['tags'] == []
assert pc['networkSpeeds'] == [100, 0], 'Although it has WiFi we do not know the speed' assert pc['networkSpeeds'] == [100, 0], 'Although it has WiFi we do not know the speed'
assert pc['rate']
rate = pc['rate']
assert rate['appearanceRange'] == 'B'
assert rate['functionalityRange'] == 'A'
assert rate['processorRange'] == 'VERY_LOW'
assert rate['ramRange'] == 'VERY_LOW'
assert rate['ratingRange'] == 'VERY_LOW'
assert rate['ram'] == 1.53
assert rate['data_storage'] == 3.76
assert rate['type'] == 'AggregateRate'
assert rate['biosRange'] == 'C'
assert rate['appearance'] > 0
assert rate['functionality'] > 0
assert rate['rating'] > 0 and rate['rating'] != 1
components = snapshot['components'] components = snapshot['components']
wifi = components[0] wifi = components[0]
assert wifi['hid'] == 'qualcomm_atheros-74_2f_68_8b_fd_c8-ar9285_wireless_network_adapter' assert wifi['hid'] == 'qualcomm_atheros-74_2f_68_8b_fd_c8-ar9285_wireless_network_adapter'
@ -208,7 +226,7 @@ def test_snapshot_real_eee_1001pxd(user: UserClient):
assert em.BenchmarkRamSysbench.t in event_types assert em.BenchmarkRamSysbench.t in event_types
assert em.StressTest.t in event_types assert em.StressTest.t in event_types
assert em.Snapshot.t in event_types assert em.Snapshot.t in event_types
assert len(events) == 5 assert len(events) == 7
gpu = components[3] gpu = components[3]
assert gpu['model'] == 'atom processor d4xx/d5xx/n4xx/n5xx integrated graphics controller' assert gpu['model'] == 'atom processor d4xx/d5xx/n4xx/n5xx integrated graphics controller'
assert gpu['manufacturer'] == 'intel corporation' assert gpu['manufacturer'] == 'intel corporation'