Home / Function/ test_update() — flask Function Reference

test_update() — flask Function Reference

Architecture documentation for the test_update() function in test_blog.py from the flask codebase.

Entity Profile

Dependency Diagram

graph TD
  99cc8828_9ab0_13db_efae_bed008a910f6["test_update()"]
  149f981e_3440_10a6_431d_dff3407a335c["test_blog.py"]
  99cc8828_9ab0_13db_efae_bed008a910f6 -->|defined in| 149f981e_3440_10a6_431d_dff3407a335c
  style 99cc8828_9ab0_13db_efae_bed008a910f6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

examples/tutorial/tests/test_blog.py lines 57–65

def test_update(client, auth, app):
    auth.login()
    assert client.get("/1/update").status_code == 200
    client.post("/1/update", data={"title": "updated", "body": ""})

    with app.app_context():
        db = get_db()
        post = db.execute("SELECT * FROM post WHERE id = 1").fetchone()
        assert post["title"] == "updated"

Subdomains

Frequently Asked Questions

What does test_update() do?
test_update() is a function in the flask codebase, defined in examples/tutorial/tests/test_blog.py.
Where is test_update() defined?
test_update() is defined in examples/tutorial/tests/test_blog.py at line 57.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free