(client, auth, app)
| 55 | |
| 56 | |
| 57 | def test_update(client, auth, app): |
| 58 | auth.login() |
| 59 | assert client.get("/1/update").status_code == 200 |
| 60 | client.post("/1/update", data={"title": "updated", "body": ""}) |
| 61 | |
| 62 | with app.app_context(): |
| 63 | db = get_db() |
| 64 | post = db.execute("SELECT * FROM post WHERE id = 1").fetchone() |
| 65 | assert post["title"] == "updated" |
| 66 | |
| 67 | |
| 68 | @pytest.mark.parametrize("path", ("/create", "/1/update")) |
nothing calls this directly
no test coverage detected