(db: SQLAlchemy, Todo: t.Any)
| 23 | |
| 24 | @pytest.mark.usefixtures("app_ctx") |
| 25 | def test_first_or_404(db: SQLAlchemy, Todo: t.Any) -> None: |
| 26 | db.session.add(Todo(title="a")) |
| 27 | db.session.commit() |
| 28 | result = db.first_or_404(db.select(Todo).filter_by(title="a")) |
| 29 | assert result.title == "a" |
| 30 | |
| 31 | with pytest.raises(NotFound): |
| 32 | db.first_or_404(db.select(Todo).filter_by(title="b")) |
| 33 | |
| 34 | |
| 35 | @pytest.mark.usefixtures("app_ctx") |
nothing calls this directly
no test coverage detected
searching dependent graphs…