changed data to json to fix nix and pytest

This commit is contained in:
Georg-Stahn
2023-12-02 12:41:21 +01:00
parent f76e15917f
commit 0f7b5e396f

View File

@@ -1,4 +1,3 @@
import json
from typing import Any from typing import Any
from api import TestClient from api import TestClient
@@ -30,7 +29,7 @@ def make_test_post_and_get(
# test post # test post
response = api.post( response = api.post(
f"/api/{apiversion}/create_{paramter}", f"/api/{apiversion}/create_{paramter}",
data={"data": json.dumps(request_body)}, json=request_body,
headers={"Content-Type": "application/json"}, headers={"Content-Type": "application/json"},
) )
assert response.status_code == 200 assert response.status_code == 200