Skip to content

Commit 8f93947

Browse files
committed
Remove one more use of a custom helper
1 parent 580a2de commit 8f93947

File tree

1 file changed

+7
-17
lines changed

1 file changed

+7
-17
lines changed

tests/mock_vws/test_add_target.py

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -484,30 +484,20 @@ class TestImage:
484484

485485
@staticmethod
486486
def test_image_valid(
487-
vuforia_database: VuforiaDatabase,
487+
vws_client: VWS,
488488
image_files_failed_state: io.BytesIO,
489489
) -> None:
490490
"""
491491
JPEG and PNG files in the RGB and greyscale color spaces are allowed.
492492
"""
493-
image_file = image_files_failed_state
494-
image_data = image_file.read()
495-
image_data_encoded = base64.b64encode(s=image_data).decode("ascii")
496-
497-
data = {
498-
"name": "example",
499-
"width": 1,
500-
"image": image_data_encoded,
501-
}
502-
503-
response = _add_target_to_vws(
504-
vuforia_database=vuforia_database,
505-
data=data,
506-
content_type="application/json",
493+
vws_client.add_target(
494+
name="example_name",
495+
width=1,
496+
image=image_files_failed_state,
497+
application_metadata=None,
498+
active_flag=True,
507499
)
508500

509-
assert_success(response=response)
510-
511501
@staticmethod
512502
def test_bad_image_format_or_color_space(
513503
bad_image_file: io.BytesIO,

0 commit comments

Comments
 (0)