This repository has been archived on 2025-12-04. You can view files and clone it, but cannot push or open issues or pull requests.
Files
wilcon-agent/tests/test_api.py
2025-06-29 08:33:19 +02:00

20 lines
538 B
Python

from fastapi.testclient import TestClient
from wilcon import app
client = TestClient(app)
def test_sysinfo_endpoint():
response = client.get("/sysinfo")
assert response.status_code == 200
assert "cpu" in response.json()
def test_netinfo_endpoint():
response = client.get("/netinfo")
assert response.status_code == 200
assert "ip_address" in response.json()
def test_procinfo_endpoint():
response = client.get("/procinfo")
assert response.status_code == 200
assert isinstance(response.json(), list)