MCPcopy
hub / github.com/pallets/flask / test_delete

Function test_delete

examples/tutorial/tests/test_blog.py:75–83  ·  view source on GitHub ↗
(client, auth, app)

Source from the content-addressed store, hash-verified

73
74
75def test_delete(client, auth, app):
76 auth.login()
77 response = client.post("/1/delete")
78 assert response.headers["Location"] == "/"
79
80 with app.app_context():
81 db = get_db()
82 post = db.execute("SELECT * FROM post WHERE id = 1").fetchone()
83 assert post is None

Callers

nothing calls this directly

Calls 4

get_dbFunction · 0.90
loginMethod · 0.80
app_contextMethod · 0.80
postMethod · 0.45

Tested by

no test coverage detected