test_put_wrong_url() — fastapi Function Reference
Architecture documentation for the test_put_wrong_url() function in test_tutorial005.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD e44c683c_6a74_cfec_543c_4204ac2da0f4["test_put_wrong_url()"] 72145184_2a0f_72ca_76c5_e4190504531a["test_tutorial005.py"] e44c683c_6a74_cfec_543c_4204ac2da0f4 -->|defined in| 72145184_2a0f_72ca_76c5_e4190504531a style e44c683c_6a74_cfec_543c_4204ac2da0f4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_tutorial/test_body_nested_models/test_tutorial005.py lines 140–160
def test_put_wrong_url(client: TestClient):
response = client.put(
"/items/5",
json={
"name": "Foo",
"price": 35.4,
"image": {"url": "not a valid url", "name": "example image"},
},
)
assert response.status_code == 422, response.text
assert response.json() == {
"detail": [
{
"loc": ["body", "image", "url"],
"input": "not a valid url",
"msg": "Input should be a valid URL, relative URL without a base",
"type": "url_parsing",
"ctx": {"error": "relative URL without a base"},
},
]
}
Domain
Subdomains
Source
Frequently Asked Questions
What does test_put_wrong_url() do?
test_put_wrong_url() is a function in the fastapi codebase, defined in tests/test_tutorial/test_body_nested_models/test_tutorial005.py.
Where is test_put_wrong_url() defined?
test_put_wrong_url() is defined in tests/test_tutorial/test_body_nested_models/test_tutorial005.py at line 140.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free