VWS-Test-Fixtures#
pytest
fixtures for testing tools with the Vuforia Web Services (VWS) API.
Installation#
pip install vws-test-fixtures
This is tested on Python 3.11+.
Example usage#
# A test to be run by pytest
def test_example(high_quality_image: io.BytesIO) -> None:
image_file_bytes = high_quality_image.getvalue()
...
All fixtures#
Use the names of the following methods as fixture names.
Fixtures for images.
- vws_test_fixtures.images.high_quality_image()#
Return an image file which is expected to have a ‘success’ status when added to a target and a high tracking rating.
At the time of writing, this image gains a tracking rating of 5.
- Return type:
- vws_test_fixtures.images.image_file_failed_state()#
Return an image file which is expected to be accepted by the add and update target endpoints, but get a “failed” status.
- Return type:
- vws_test_fixtures.images.png_too_large()#
Return a PNG file which has dimensions which are too large to be added to a Vuforia database.
- Return type:
- vws_test_fixtures.images.image_file_success_state_low_rating()#
Return an image file which is expected to have a ‘success’ status when added to a target and a low rating after processing.
- Return type:
- vws_test_fixtures.images.corrupted_image_file()#
Return an image file which is corrupted.
- Return type:
- vws_test_fixtures.images.image_files_failed_state(request)#
Return an image file which is expected to be accepted by the add and update target endpoints, but get a “failed” status.
- Return type:
- vws_test_fixtures.images.bad_image_file(request)#
Return an image file which is expected to cause a BadImage result when an attempt is made to add it to the target database.
- Return type: