mirror of
https://github.com/fastapi/fastapi.git
synced 2026-03-30 20:54:03 -04:00
📝 Update template docs with more info about url_for (#5937)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
This commit is contained in:
committed by
GitHub
parent
22e68b151d
commit
0c796747a3
@@ -16,7 +16,10 @@ def test_main():
|
||||
client = TestClient(app)
|
||||
response = client.get("/items/foo")
|
||||
assert response.status_code == 200, response.text
|
||||
assert b"<h1>Item ID: foo</h1>" in response.content
|
||||
assert (
|
||||
b'<h1><a href="http://testserver/items/foo">Item ID: foo</a></h1>'
|
||||
in response.content
|
||||
)
|
||||
response = client.get("/static/styles.css")
|
||||
assert response.status_code == 200, response.text
|
||||
assert b"color: green;" in response.content
|
||||
|
||||
Reference in New Issue
Block a user