Commit 080b86c
Add comprehensive VuMark instance generation tests (#2954)
* Add comprehensive VuMark instance generation tests and mock support
- Add tests for PNG, SVG, and PDF output formats (parametrized)
- Add tests for invalid Accept header (returns InvalidAcceptHeader 400)
- Add tests for empty instance_id (returns InvalidInstanceId 422)
- Organise tests into a class with verify_mock_vuforia on the class
- Implement Accept header validation and multi-format responses in mock
- Add InvalidAcceptHeader and InvalidInstanceId result codes and exceptions
- Add minimal SVG and PDF mock response content
- Document VuMark image simplification in differences-to-vws.rst
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Fix mypy errors in VuMark tests and Flask handler
- Use argnames=/argvalues= keyword arguments in pytest.mark.parametrize
- Use keyword argument key= for Flask Headers.get() call
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add svg and pdf to spelling private dictionary
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Retry delete_target if TargetStatusProcessingError after update_target
Vuforia has a race condition where delete_target can raise
TargetStatusProcessingError immediately after wait_for_target_processed
returns, because update_target(active_flag=False) triggers a brief
reprocessing cycle that may not have started by the time the wait
completes. Retry once with another wait if this occurs.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Complete remaining todos: ResultCodes constants, spelling revert, retry
- Use ResultCodes.INVALID_ACCEPT_HEADER.value and
ResultCodes.INVALID_INSTANCE_ID.value in test assertions instead
of raw strings
- Reword docstrings/docs to avoid acronyms that trigger the spell
checker, and revert spelling_private_dict.txt to its pre-PR state
- Replace one-off try/except retry in _delete_all_targets with a
proper tenacity-based _delete_target_when_processed helper function
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Extract multipart parsing helper; revert retry changes to separate issue
- Extract repeated multipart parsing logic in image_validators.py into
_parse_multipart_files helper, eliminating four copies of the same
six-line pattern
- Revert _delete_target_when_processed retry changes from vuforia_backends.py;
tracked separately as #2955
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Simplify valid_accept_types: content type equals accept key
The dict values were (bytes, str) tuples where the str was always
identical to the dict key (the Accept MIME type). Use a plain
dict[str, bytes] and derive the content type directly from `accept`.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Remove duplicate _parse_multipart_files introduced by merge
Both branches independently added the same helper; keep the
@beartype-decorated version from main.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Fix Docker build on PRs; remove duplicate rst section
- Pass files: docker-bake.hcl explicitly to docker/bake-action so it
uses the local checked-out file rather than fetching from the PR
merge ref (refs/pull/*/merge) via HTTPS, which requires auth not
available to the bake action
- Remove duplicate 'VuMark instance images' section in
differences-to-vws.rst introduced by the merge
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Revert docker-build.yml change; Docker failure was transient
The Docker build failures are intermittent infrastructure issues, not a
systematic problem. The files: docker-bake.hcl change was unnecessary.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 7bf40c4 commit 080b86c
File tree
5 files changed
+268
-46
lines changed- src/mock_vws
- _flask_server
- _requests_mock_server
- _services_validators
- tests/mock_vws
5 files changed
+268
-46
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
14 | 29 | | |
15 | 30 | | |
16 | 31 | | |
| |||
45 | 60 | | |
46 | 61 | | |
47 | 62 | | |
| 63 | + | |
| 64 | + | |
48 | 65 | | |
49 | 66 | | |
50 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
22 | 28 | | |
23 | 29 | | |
24 | 30 | | |
25 | 31 | | |
26 | 32 | | |
| 33 | + | |
| 34 | + | |
27 | 35 | | |
28 | 36 | | |
29 | 37 | | |
| |||
351 | 359 | | |
352 | 360 | | |
353 | 361 | | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
354 | 379 | | |
355 | 380 | | |
356 | 381 | | |
357 | | - | |
| 382 | + | |
358 | 383 | | |
359 | 384 | | |
360 | 385 | | |
| |||
364 | 389 | | |
365 | 390 | | |
366 | 391 | | |
367 | | - | |
| 392 | + | |
368 | 393 | | |
369 | 394 | | |
370 | 395 | | |
| |||
Lines changed: 37 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
22 | 28 | | |
23 | 29 | | |
24 | 30 | | |
25 | 31 | | |
26 | 32 | | |
| 33 | + | |
| 34 | + | |
27 | 35 | | |
28 | 36 | | |
29 | 37 | | |
| |||
295 | 303 | | |
296 | 304 | | |
297 | 305 | | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
305 | 330 | | |
| 331 | + | |
| 332 | + | |
306 | 333 | | |
307 | 334 | | |
308 | 335 | | |
309 | 336 | | |
310 | 337 | | |
311 | 338 | | |
312 | 339 | | |
313 | | - | |
| 340 | + | |
314 | 341 | | |
315 | 342 | | |
316 | 343 | | |
317 | 344 | | |
318 | 345 | | |
319 | 346 | | |
320 | 347 | | |
321 | | - | |
| 348 | + | |
322 | 349 | | |
323 | 350 | | |
324 | 351 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
530 | 530 | | |
531 | 531 | | |
532 | 532 | | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
533 | 609 | | |
534 | 610 | | |
535 | 611 | | |
| |||
0 commit comments