Skip to content

Commit

Permalink
fixup! Issue #332 introduce support for job listing pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Dec 3, 2024
1 parent f5d6eff commit 9417856
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion openeo_driver/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ def list_jobs(user: User):
# TODO: remove support for this old API
listing = get_user_jobs(user_id=user.user_id)

# TODO: while eliminating old `get_user_jobs` API above, also just settle on dict based return
# TODO: while eliminating old `get_user_jobs` API above, also just settle on JobListing based return
if isinstance(listing, list):
jobs = listing
links = []
Expand Down
4 changes: 2 additions & 2 deletions tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1468,7 +1468,7 @@ def test_list_user_jobs_paging(self, api100):
],
}

# Follow link to next page (first, linking to second page)
# Follow link to second page (which links to third page)
next_url = data["links"][0]["href"]
resp = api100.get(path=api100.extract_path(next_url), headers=self.AUTH_HEADER)
data = resp.assert_status_code(200).json
Expand All @@ -1483,7 +1483,7 @@ def test_list_user_jobs_paging(self, api100):
],
}

# Follow link to next (second, no next page)
# Follow link to third page (which has no next link)
next_url = data["links"][0]["href"]
resp = api100.get(path=api100.extract_path(next_url), headers=self.AUTH_HEADER)
data = resp.assert_status_code(200).json
Expand Down

0 comments on commit 9417856

Please sign in to comment.