sicherheitsupdate

This commit is contained in:
stephan
2025-06-29 08:33:19 +02:00
parent 4ed4d69b21
commit 55f6d0816c
9 changed files with 286 additions and 247 deletions

15
tests/test_sysinfo.py Normal file
View 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