Skip to content

Commit

Permalink
Fix flaky pagination tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospri committed Nov 5, 2024
1 parent e519f1a commit 0765b53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unit/lms/views/dashboard/pagination_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class TestGetPage:
def test_when_no_next_page(self, pyramid_request, db_session):
pyramid_request.parsed_params = {"limit": 100}
courses = factories.Course.create_batch(5)
query = select(Course)
query = select(Course).order_by(Course.id)
db_session.flush()

items, pagination = get_page(pyramid_request, query, (Course.id,))
Expand All @@ -35,7 +35,7 @@ def test_when_empty(self, pyramid_request):
def test_it_calculates_next(self, pyramid_request, db_session):
pyramid_request.parsed_params = {"limit": 1}
courses = factories.Course.create_batch(5)
query = select(Course)
query = select(Course).order_by(Course.id)
db_session.flush()

items, pagination = get_page(pyramid_request, query, (Course.id,))
Expand Down

0 comments on commit 0765b53

Please sign in to comment.