sicherheitsupdate
This commit is contained in:
15
tests/test_sysinfo.py
Normal file
15
tests/test_sysinfo.py
Normal file
@ -0,0 +1,15 @@
|
||||
from sysinfo import get_hardware_info
|
||||
|
||||
def test_sysinfo_contains_required_keys():
|
||||
data = get_hardware_info()
|
||||
assert isinstance(data, dict)
|
||||
|
||||
for key in ["cpu", "ram", "disk", "os", "network_basic", "user_accounts", "gpu"]:
|
||||
assert key in data
|
||||
|
||||
def test_cpu_info_structure():
|
||||
cpu = get_hardware_info()["cpu"]
|
||||
assert "model" in cpu
|
||||
assert "cores" in cpu
|
||||
assert "threads" in cpu
|
||||
assert "usage" in cpu
|
||||
Reference in New Issue
Block a user