Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow including tokens in querystring vocabs #1403

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jackahl
Copy link
Member

@jackahl jackahl commented May 5, 2022

fix for #1402. Required to be able to merge plone/plone.app.querystring#107

@jackahl jackahl requested review from jensens and ksuess May 5, 2022 09:07
@mister-roboto
Copy link

@jackahl thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

@netlify
Copy link

netlify bot commented May 5, 2022

Deploy Preview for plone-restapi canceled.

Name Link
🔨 Latest commit 88fed9c
🔍 Latest deploy log https://app.netlify.com/sites/plone-restapi/deploys/628a014b31e77f0009a4c014

self.assertTrue(
all(elem in idx["values"].items() for elem in expected_vocab_values.items())
Copy link
Member Author

@jackahl jackahl May 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ksuess I removed this check as it only was breaking with the new inclusion of tokens inside of vocabularies returned in plone/plone.app.querystring#107.

Also I was not able to determine what is tested here anyways in a glimbs, as this nesting of loops, although short and elegant, is not really easy to read.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am OK with your refactoring, especially because this test 'test_endpoint_inlines_vocabularies' is not about testing the existence of review states, but about testing the format of the response of the 'querystring' endpoint.

self.assertTrue(
all(elem in idx["values"].items() for elem in expected_vocab_values.items())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am OK with your refactoring, especially because this test 'test_endpoint_inlines_vocabularies' is not about testing the existence of review states, but about testing the format of the response of the 'querystring' endpoint.

@@ -99,10 +99,26 @@ def test_endpoint_inlines_vocabularies(self):
"published": {"title": "Published with accent \xe9 [published]"},
"visible": {"title": "Public draft [visible]"},
}

self.assertTrue("external" in (idx["values"].keys()))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

included in the subsequent test

@@ -99,10 +99,26 @@ def test_endpoint_inlines_vocabularies(self):
"published": {"title": "Published with accent \xe9 [published]"},
"visible": {"title": "Public draft [visible]"},
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With your refactoring of the tests, the 'expected_vocab_values' can already be updated with the additional token.

@jackahl
Copy link
Member Author

jackahl commented May 9, 2022

@jenkins-plone-org please run jobs

@jensens jensens requested a review from ksuess May 12, 2022 07:53
@ksuess
Copy link
Member

ksuess commented May 12, 2022

Thanks for requesting a review. See my review above.

@jackahl
Copy link
Member Author

jackahl commented May 22, 2022

@ksuess could you pls confirm that all requested changes have been addressed?

Copy link
Member

@ksuess ksuess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tisto
Copy link
Member

tisto commented Aug 25, 2023

@jackahl let's discuss this today or next week...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants