Skip to content

Commit a72b245

Browse files
committed
Remove one more use of a custom helper
1 parent f02bddd commit a72b245

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

tests/mock_vws/test_add_target.py

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -884,31 +884,23 @@ class TestApplicationMetadata:
884884
ids=["Short", "Max length"],
885885
)
886886
def test_base64_encoded(
887-
vuforia_database: VuforiaDatabase,
888887
image_file_failed_state: io.BytesIO,
889888
metadata: bytes,
889+
vws_client: VWS,
890890
) -> None:
891891
"""
892892
A base64 encoded string is valid application metadata.
893893
"""
894-
image_data = image_file_failed_state.read()
895-
image_data_encoded = base64.b64encode(s=image_data).decode("ascii")
896894
metadata_encoded = base64.b64encode(s=metadata).decode("ascii")
897895

898-
data = {
899-
"name": "example_name",
900-
"width": 1,
901-
"image": image_data_encoded,
902-
"application_metadata": metadata_encoded,
903-
}
904-
905-
response = _add_target_to_vws(
906-
vuforia_database=vuforia_database,
907-
data=data,
896+
vws_client.add_target(
897+
name="example",
898+
width=1,
899+
image=image_file_failed_state,
900+
application_metadata=metadata_encoded,
901+
active_flag=True,
908902
)
909903

910-
assert_success(response=response)
911-
912904
@staticmethod
913905
def test_null(
914906
vuforia_database: VuforiaDatabase,

0 commit comments

Comments
 (0)