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

[#8] Update API endpoint for forms #12

Merged
merged 1 commit into from
Jun 27, 2024
Merged

[#8] Update API endpoint for forms #12

merged 1 commit into from
Jun 27, 2024

Conversation

pi-sigma
Copy link
Collaborator

@pi-sigma pi-sigma commented Jun 26, 2024

Fixes #8

We only support OpenForms >= 2.6, where the new endpoint was introduced (the only supported version that does not have the new endpoint is 2.5).

@pi-sigma pi-sigma requested a review from sergei-maertens June 26, 2024 09:12
openformsclient/client.py Outdated Show resolved Hide resolved

result = self.client.get_form("myform")
self.assertDictEqual(result, {})

def test_get_form_with_error(self, m):
m.get(f"{self.api_root}forms/myform", status_code=401)
m.get(f"{self.api_root}public/forms/myform", status_code=401)
Copy link
Member

Choose a reason for hiding this comment

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

this endpoint does not exist

I recommend using VCR.py for these tests with a docker-compose setup to bring up a real instance :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've looked into VCR and agree (haven't thought about docker-compose though). Will do this in a separate PR.

@pi-sigma pi-sigma force-pushed the issue/8-api-endpoint branch from 539b917 to cffb558 Compare June 26, 2024 13:33
@pi-sigma pi-sigma force-pushed the issue/8-api-endpoint branch from cffb558 to 81e0207 Compare June 26, 2024 14:04
@pi-sigma pi-sigma requested a review from sergei-maertens June 26, 2024 14:07
@pi-sigma pi-sigma merged commit c9ad920 into main Jun 27, 2024
11 checks passed
@pi-sigma pi-sigma deleted the issue/8-api-endpoint branch June 27, 2024 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

With the 2.6 release, there are more performant endpoints available
2 participants