)
def test_post_body(path, body, expected_status, expected_response):
response = client.put(path, json=body)
- print(response.text)
assert response.status_code == expected_status
assert response.json() == expected_response
-import sys
-
import pytest
from starlette.testclient import TestClient
client = TestClient(app)
-print(sys.path)
-
openapi_schema = {
"openapi": "3.0.2",
"info": {"title": "Fast API", "version": "0.1.0"},
-import sys
-
import pytest
from starlette.testclient import TestClient
client = TestClient(app)
-print(sys.path)
-
openapi_schema = {
"openapi": "3.0.2",
"info": {"title": "Fast API", "version": "0.1.0"},