MCPcopy
hub / github.com/pallets-eco/flask-sqlalchemy / paginate

Function paginate

tests/test_pagination.py:146–153  ·  view source on GitHub ↗
(app: Flask, db: SQLAlchemy, Todo: t.Any)

Source from the content-addressed store, hash-verified

144
145@pytest.fixture
146def paginate(app: Flask, db: SQLAlchemy, Todo: t.Any) -> _PaginateCallable:
147 with app.app_context():
148 for i in range(1, 251):
149 db.session.add(Todo(title=f"task {i}"))
150
151 db.session.commit()
152
153 return _PaginateCallable(app, db, Todo)
154
155
156def test_paginate(paginate: _PaginateCallable) -> None:

Callers 6

test_paginateFunction · 0.85
test_paginate_qsFunction · 0.85
test_paginate_maxFunction · 0.85
test_next_page_sizeFunction · 0.85
test_no_countFunction · 0.85
test_error_outFunction · 0.85

Calls 2

_PaginateCallableClass · 0.85
TodoFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…