Skip to content

Commit

Permalink
feat: remove object tagging rest api pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
rpenido committed Sep 22, 2023
1 parent f9148f0 commit b8b1fa7
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -735,8 +735,9 @@ def test_tag_course(self, user_attr, taxonomy_attr, tag_values, expected_status)

assert response.status_code == expected_status
if status.is_success(expected_status):
assert len(response.data.get("results")) == len(tag_values)
assert set(t["value"] for t in response.data["results"]) == set(tag_values)
assert len(response.data) == len(tag_values)
assert set(t["value"] for t in response.data) == set(tag_values)


@ddt.data(
# Can't add invalid tags to a object using a closed taxonomy
Expand Down Expand Up @@ -803,8 +804,8 @@ def test_tag_xblock(self, user_attr, taxonomy_attr, tag_values, expected_status)

assert response.status_code == expected_status
if status.is_success(expected_status):
assert len(response.data.get("results")) == len(tag_values)
assert set(t["value"] for t in response.data["results"]) == set(tag_values)
assert len(response.data) == len(tag_values)
assert set(t["value"] for t in response.data) == set(tag_values)

@ddt.data(
# Can't add invalid tags to a object using a closed taxonomy
Expand Down
2 changes: 1 addition & 1 deletion requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ click==8.1.6
openedx-events<8.6.0 # Open edX Events from Hooks Extension Framework (OEP-50)

# pinning this version to avoid updates while the library is being developed
openedx-learning==0.1.6
openedx-learning==0.1.7

# lti-consumer-xblock 9.6.2 contains a breaking change that makes
# existing custom parameter configurations unusable.
Expand Down
2 changes: 1 addition & 1 deletion requirements/edx/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ openedx-filters==1.6.0
# via
# -r requirements/edx/kernel.in
# lti-consumer-xblock
openedx-learning==0.1.6
openedx-learning @ git+https://github.com/open-craft/openedx-learning@rpenido/fal-3501-enforce-limit-on-number-of-tags-per-object
# via
# -c requirements/edx/../constraints.txt
# -r requirements/edx/kernel.in
Expand Down
2 changes: 1 addition & 1 deletion requirements/edx/development.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,7 @@ openedx-filters==1.6.0
# -r requirements/edx/doc.txt
# -r requirements/edx/testing.txt
# lti-consumer-xblock
openedx-learning==0.1.6
openedx-learning @ git+https://github.com/open-craft/openedx-learning@rpenido/fal-3501-enforce-limit-on-number-of-tags-per-object
# via
# -c requirements/edx/../constraints.txt
# -r requirements/edx/doc.txt
Expand Down
2 changes: 1 addition & 1 deletion requirements/edx/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ openedx-filters==1.6.0
# via
# -r requirements/edx/base.txt
# lti-consumer-xblock
openedx-learning==0.1.6
openedx-learning @ git+https://github.com/open-craft/openedx-learning@rpenido/fal-3501-enforce-limit-on-number-of-tags-per-object
# via
# -c requirements/edx/../constraints.txt
# -r requirements/edx/base.txt
Expand Down
3 changes: 2 additions & 1 deletion requirements/edx/kernel.in
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ openedx-calc # Library supporting mathematical calculatio
openedx-django-require
openedx-events # Open edX Events from Hooks Extension Framework (OEP-50)
openedx-filters # Open edX Filters from Hooks Extension Framework (OEP-50)
openedx-learning # Open edX Learning core (experimental)
# openedx-learning # Open edX Learning core (experimental)
openedx-learning @ git+https://github.com/open-craft/openedx-learning@rpenido/fal-3501-enforce-limit-on-number-of-tags-per-object # Remove this once openedx-learning is tagged
openedx-mongodbproxy
openedx-django-wiki
openedx-blockstore
Expand Down
2 changes: 1 addition & 1 deletion requirements/edx/testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ openedx-filters==1.6.0
# via
# -r requirements/edx/base.txt
# lti-consumer-xblock
openedx-learning==0.1.6
openedx-learning @ git+https://github.com/open-craft/openedx-learning@rpenido/fal-3501-enforce-limit-on-number-of-tags-per-object
# via
# -c requirements/edx/../constraints.txt
# -r requirements/edx/base.txt
Expand Down

0 comments on commit b8b1fa7

Please sign in to comment.