This commit is contained in:
Shahar Ilany 2022-08-24 21:20:29 +03:00 committed by GitHub
parent 901639098b
commit 4979f90732
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -1,18 +1,18 @@
from fastapi import FastAPI
from fastapi.testclient import TestClient
app = FastAPI(title="White Shuli 2")
app = FastAPI(title="Example App")
@app.get("/pita/shuli")
@app.get("/a/b")
async def get_shuli_in_a_pita():
return {"shuli": "pita"}
return {"a": "b"}
client = TestClient(app)
def test_swagger_ui():
def test_elements_uit():
response = client.get("/elements")
assert response.status_code == 200, response.text
print(response.text)
@ -21,5 +21,5 @@ def test_swagger_ui():
def test_response():
response = client.get("/pita/shuli")
assert response.json() == {"shuli": "pita"}
response = client.get("/a/b")
assert response.json() == {"a": "b"}