Skip to content

Commit 6dce119

Browse files
committed
Remove one more use of a custom helper
1 parent b0a6e08 commit 6dce119

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

tests/mock_vws/test_add_target.py

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,31 +1016,22 @@ def test_invalid_type(
10161016

10171017
@staticmethod
10181018
def test_not_base64_encoded_processable(
1019-
vuforia_database: VuforiaDatabase,
10201019
high_quality_image: io.BytesIO,
10211020
not_base64_encoded_processable: str,
1021+
vws_client: VWS,
10221022
) -> None:
10231023
"""
10241024
Some strings which are not valid base64 encoded strings are allowed as
10251025
application metadata.
10261026
"""
1027-
image_content = high_quality_image.getvalue()
1028-
image_data_encoded = base64.b64encode(s=image_content).decode("ascii")
1029-
1030-
data = {
1031-
"name": "example_name",
1032-
"width": 1,
1033-
"image": image_data_encoded,
1034-
"application_metadata": not_base64_encoded_processable,
1035-
}
1036-
1037-
response = _add_target_to_vws(
1038-
vuforia_database=vuforia_database,
1039-
data=data,
1027+
vws_client.add_target(
1028+
name="example",
1029+
width=1,
1030+
image=high_quality_image,
1031+
application_metadata=not_base64_encoded_processable,
1032+
active_flag=True,
10401033
)
10411034

1042-
assert_success(response=response)
1043-
10441035
@staticmethod
10451036
def test_not_base64_encoded_not_processable(
10461037
vuforia_database: VuforiaDatabase,

0 commit comments

Comments
 (0)