Add VuMark to endpoint fixture for auth testing#2960
Merged
adamtheturtle merged 2 commits intomainfrom Feb 18, 2026
Merged
Conversation
Adds a vumark_generate_instance fixture to the endpoint parametrization, allowing all auth tests (missing header, malformed header, bad keys, etc.) to also cover the VuMark instance generation endpoint. Updates the Endpoint class to support endpoints with binary responses by making successful_headers_result_code optional. Updates test_date_header.py to handle VuMark's binary success response. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Real Vuforia returns result_code 'BadRequest' (not 'Fail') when invalid JSON is sent to the VuMark instance generation endpoint. Adds the BAD_REQUEST result code, a BadRequestError exception, and updates validate_json() to raise the correct error based on the request path. Updates the test to expect BadRequest for the /instances endpoint. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds VuMark instance generation endpoint to the parametrized endpoint fixture, enabling all existing auth tests to cover VuMark. Updates the Endpoint class to support endpoints that return binary data on success by making successful_headers_result_code optional. Updates test_date_header.py to properly handle VuMark's binary response format.
Changes
vumark_generate_instancefixture in prepared_requests.py following the same pattern as other endpointssuccessful_headers_result_code: ResultCodes | Nonein Endpoint class to accommodate non-JSON responses🤖 Generated with Claude Code
Note
Medium Risk
Touches core request validation/error-shaping and broadens multiple parametrized test suites, so mismatched endpoint detection or result-code handling could cause regressions across many service endpoints.
Overview
Adds the VuMark instance-generation endpoint (
POST /targets/<id>/instances) to the shared parametrizedendpointfixture so existing auth/date/invalid-JSON tests run against VuMark as well.Updates test utilities and assertions to handle VuMark’s binary success responses by allowing
Endpoint.successful_headers_result_codeto beNoneand skipping JSONresult_codeassertions intest_date_header. Separately, aligns mock service validation to return Vuforia’sBadRequestresult_codefor invalid JSON specifically on the/instancesroute by introducingResultCodes.BAD_REQUEST, addingBadRequestError, and routingvalidate_jsonerrors based onrequest_path.Written by Cursor Bugbot for commit 04c35f6. This will update automatically on new commits. Configure here.