Browse Source

Rename test

pull/5624/head
Sebastián Ramírez 8 months ago
parent
commit
79442f7a01
  1. 8
      tests/test_security_scopes_dont_bleed.py

8
tests/test_dependency_scopes.py → tests/test_security_scopes_dont_bleed.py

@ -26,8 +26,8 @@ async def dep3(
app = FastAPI() app = FastAPI()
@app.get("/recursive_scopes") @app.get("/scopes")
def recursive_scopes( def get_scopes(
dep3: Annotated[Dict[str, Any], Security(dep3, scopes=["scope3"])], dep3: Annotated[Dict[str, Any], Security(dep3, scopes=["scope3"])],
): ):
return dep3 return dep3
@ -36,8 +36,8 @@ def recursive_scopes(
client = TestClient(app) client = TestClient(app)
def test_recursive_scopes(): def test_security_scopes_dont_bleed():
response = client.get("recursive_scopes") response = client.get("/scopes")
assert response.status_code == 200 assert response.status_code == 200
assert response.json() == { assert response.json() == {
"dep1": ["scope3", "scope1"], "dep1": ["scope3", "scope1"],
Loading…
Cancel
Save