📝 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:
Ezzeddin AbdullahandSebastián Ramírez authored and GitHub committed 2024-01-11 23:25:37 +01:00
1 parent 22e68b151d
commit 0c796747a3
3 files changed
+49 -6

No files matched your search

@@ -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