generated from Luis/nextjs-python-web-template
changed data to json to fix nix and pytest
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user