Home / File/ test_swagger_ui_init_oauth.py — fastapi Source File

test_swagger_ui_init_oauth.py — fastapi Source File

Architecture documentation for test_swagger_ui_init_oauth.py, a python file in the fastapi codebase. 2 imports, 0 dependents.

File python FastAPI Responses 2 imports 3 functions

Entity Profile

Dependency Diagram

graph LR
  2428edc6_1e3d_540c_8336_25705897446f["test_swagger_ui_init_oauth.py"]
  534f6e44_61b8_3c38_8b89_6934a6df9802["__init__.py"]
  2428edc6_1e3d_540c_8336_25705897446f --> 534f6e44_61b8_3c38_8b89_6934a6df9802
  a7c04dee_ee23_5891_b185_47ff6bed036d["testclient.py"]
  2428edc6_1e3d_540c_8336_25705897446f --> a7c04dee_ee23_5891_b185_47ff6bed036d
  style 2428edc6_1e3d_540c_8336_25705897446f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

from fastapi import FastAPI
from fastapi.testclient import TestClient

swagger_ui_init_oauth = {"clientId": "the-foo-clients", "appName": "The Predendapp"}

app = FastAPI(swagger_ui_init_oauth=swagger_ui_init_oauth)


@app.get("/items/")
async def read_items():
    return {"id": "foo"}


client = TestClient(app)


def test_swagger_ui():
    response = client.get("/docs")
    assert response.status_code == 200, response.text
    print(response.text)
    assert "ui.initOAuth" in response.text
    assert '"appName": "The Predendapp"' in response.text
    assert '"clientId": "the-foo-clients"' in response.text


def test_response():
    response = client.get("/items/")
    assert response.json() == {"id": "foo"}

Domain

Subdomains

Frequently Asked Questions

What does test_swagger_ui_init_oauth.py do?
test_swagger_ui_init_oauth.py is a source file in the fastapi codebase, written in python. It belongs to the FastAPI domain, Responses subdomain.
What functions are defined in test_swagger_ui_init_oauth.py?
test_swagger_ui_init_oauth.py defines 3 function(s): read_items, test_response, test_swagger_ui.
What does test_swagger_ui_init_oauth.py depend on?
test_swagger_ui_init_oauth.py imports 2 module(s): __init__.py, testclient.py.
Where is test_swagger_ui_init_oauth.py in the architecture?
test_swagger_ui_init_oauth.py is located at tests/test_swagger_ui_init_oauth.py (domain: FastAPI, subdomain: Responses, directory: tests).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free