Home / Function/ test_encode_model_with_pure_path() — fastapi Function Reference

test_encode_model_with_pure_path() — fastapi Function Reference

Architecture documentation for the test_encode_model_with_pure_path() function in test_jsonable_encoder.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  a737bf87_2a15_ce15_0516_d2fb96d9b25e["test_encode_model_with_pure_path()"]
  80ce950d_4c72_e7d9_21bb_a5c60524786c["test_jsonable_encoder.py"]
  a737bf87_2a15_ce15_0516_d2fb96d9b25e -->|defined in| 80ce950d_4c72_e7d9_21bb_a5c60524786c
  1ac1bc37_1a47_e7e2_9156_ab0473094700["jsonable_encoder()"]
  a737bf87_2a15_ce15_0516_d2fb96d9b25e -->|calls| 1ac1bc37_1a47_e7e2_9156_ab0473094700
  style a737bf87_2a15_ce15_0516_d2fb96d9b25e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_jsonable_encoder.py lines 243–251

def test_encode_model_with_pure_path():
    class ModelWithPath(BaseModel):
        path: PurePath

        model_config = {"arbitrary_types_allowed": True}

    test_path = PurePath("/foo", "bar")
    obj = ModelWithPath(path=test_path)
    assert jsonable_encoder(obj) == {"path": str(test_path)}

Domain

Subdomains

Frequently Asked Questions

What does test_encode_model_with_pure_path() do?
test_encode_model_with_pure_path() is a function in the fastapi codebase, defined in tests/test_jsonable_encoder.py.
Where is test_encode_model_with_pure_path() defined?
test_encode_model_with_pure_path() is defined in tests/test_jsonable_encoder.py at line 243.
What does test_encode_model_with_pure_path() call?
test_encode_model_with_pure_path() calls 1 function(s): jsonable_encoder.

Analyze Your Own Codebase

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

Try Supermodel Free