Home / Function/ test_remove_tags() — fastapi Function Reference

test_remove_tags() — fastapi Function Reference

Architecture documentation for the test_remove_tags() function in test_tutorial004.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  56fe767c_dd7b_6490_59c8_120fc3f27462["test_remove_tags()"]
  401a7ccf_6be2_fdf3_5881_3b23708d7133["test_tutorial004.py"]
  56fe767c_dd7b_6490_59c8_120fc3f27462 -->|defined in| 401a7ccf_6be2_fdf3_5881_3b23708d7133
  style 56fe767c_dd7b_6490_59c8_120fc3f27462 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_tutorial/test_generate_clients/test_tutorial004.py lines 11–236

def test_remove_tags(tmp_path: pathlib.Path):
    tmp_file = tmp_path / "openapi.json"
    openapi_json = tutorial003_py39.app.openapi()
    tmp_file.write_text(json.dumps(openapi_json))

    with patch("pathlib.Path", return_value=tmp_file):
        importlib.import_module("docs_src.generate_clients.tutorial004_py39")

    modified_openapi = json.loads(tmp_file.read_text())
    assert modified_openapi == snapshot(
        {
            "components": {
                "schemas": {
                    "HTTPValidationError": {
                        "properties": {
                            "detail": {
                                "items": {
                                    "$ref": "#/components/schemas/ValidationError",
                                },
                                "title": "Detail",
                                "type": "array",
                            },
                        },
                        "title": "HTTPValidationError",
                        "type": "object",
                    },
                    "Item": {
                        "properties": {
                            "name": {
                                "title": "Name",
                                "type": "string",
                            },
                            "price": {
                                "title": "Price",
                                "type": "number",
                            },
                        },
                        "required": [
                            "name",
                            "price",
                        ],
                        "title": "Item",
                        "type": "object",
                    },
                    "ResponseMessage": {
                        "properties": {
                            "message": {
                                "title": "Message",
                                "type": "string",
                            },
                        },
                        "required": [
                            "message",
                        ],
                        "title": "ResponseMessage",
                        "type": "object",
                    },
                    "User": {
                        "properties": {
                            "email": {
                                "title": "Email",
                                "type": "string",
                            },
                            "username": {
                                "title": "Username",
                                "type": "string",
                            },
                        },
                        "required": [
                            "username",
                            "email",
                        ],
                        "title": "User",
                        "type": "object",
                    },
                    "ValidationError": {
                        "properties": {
                            "ctx": {"title": "Context", "type": "object"},
                            "input": {"title": "Input"},
                            "loc": {
                                "items": {

Domain

Subdomains

Frequently Asked Questions

What does test_remove_tags() do?
test_remove_tags() is a function in the fastapi codebase, defined in tests/test_tutorial/test_generate_clients/test_tutorial004.py.
Where is test_remove_tags() defined?
test_remove_tags() is defined in tests/test_tutorial/test_generate_clients/test_tutorial004.py at line 11.

Analyze Your Own Codebase

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

Try Supermodel Free