-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixing bug cp_mapper by unpacking threads from attributes_from_cpu_name
- Loading branch information
1 parent
806f6ee
commit 7603978
Showing
2 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import pytest | ||
from httpx import AsyncClient | ||
|
||
from boaviztapi.main import app | ||
|
||
pytest_plugins = ('pytest_asyncio',) | ||
|
||
|
||
@pytest.mark.asyncio | ||
async def test_complete_cpu(): | ||
async with AsyncClient(app=app, base_url="http://test") as ac: | ||
res = await ac.post('/v1/consumption_profile/cpu', json={"cpu": {"name": "intel xeon gold 6134", "tdp": 130}}) | ||
|
||
assert res.json() == {'a': 35.5688, 'b': 0.2438, 'c': 9.6694, 'd': -0.6087} |