We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc496dc commit e58b9adCopy full SHA for e58b9ad
tests/supervisor/test_views.py
@@ -24,3 +24,16 @@ async def test_allocation_fails_on_invalid_item_hash(aiohttp_client):
24
"type": "value_error.unknownhash",
25
},
26
]
27
+
28
29
+@pytest.mark.asyncio
30
+async def test_system_usage(aiohttp_client):
31
+ """Test that the allocation endpoint fails when an invalid item_hash is provided."""
32
+ client = await aiohttp_client(app)
33
+ settings.ALLOCATION_TOKEN_HASH = "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08" # = "test"
34
+ response: web.Response = await client.get("/about/usage/system")
35
+ assert response.status == 200
36
+ # check if it is valid json
37
+ resp = await response.json()
38
+ assert "cpu" in resp
39
+ assert resp["cpu"]["count"] > 0
0 commit comments