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

Function test_create

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

Source from the content-addressed store, hash-verified

44
45
46def test_create(client, auth, app):
47 auth.login()
48 assert client.get("/create").status_code == 200
49 client.post("/create", data={"title": "created", "body": ""})
50
51 with app.app_context():
52 db = get_db()
53 count = db.execute("SELECT COUNT(id) FROM post").fetchone()[0]
54 assert count == 2
55
56
57def test_update(client, auth, app):

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected