Skip to content
This repository was archived by the owner on Oct 30, 2026. It is now read-only.

Commit 3c29316

Browse files
Merge pull request #3803 from VWS-Python/codex/shared-processing-summary-20261028
Run the processing-summary contract through both mock adapters
2 parents 404ca7b + 4d506e8 commit 3c29316

1 file changed

Lines changed: 19 additions & 28 deletions

File tree

‎tests/mock_vws/database_summary/test_database_summary.py‎

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,46 +3,37 @@
33
import io
44
import uuid
55

6+
import pytest
67
from vws import VWS
78

8-
from mock_vws import MockVWS
9-
from mock_vws.database import CloudDatabase
109
from tests.mock_vws.database_summary.helpers import (
1110
wait_for_image_numbers,
1211
)
1312

1413

14+
@pytest.mark.usefixtures("mock_only_vuforia")
1515
def test_processing_images(
16+
*,
17+
vws_client: VWS,
1618
image_file_success_state_low_rating: io.BytesIO,
1719
) -> None:
1820
"""The number of images in the processing state is returned.
1921
20-
These tests are run only on the mock, and not the real
21-
implementation.
22-
23-
This is because the real implementation is not reliable. This is a
24-
documented difference between the mock and the real implementation.
22+
The mock adapters report processing images immediately. Real Vuforia's
23+
summaries are not reliable while targets are processing.
2524
"""
26-
database = CloudDatabase()
27-
vws_client = VWS(
28-
server_access_key=database.server_access_key,
29-
server_secret_key=database.server_secret_key,
25+
_ = vws_client.add_target(
26+
name=uuid.uuid4().hex,
27+
width=1,
28+
image=image_file_success_state_low_rating,
29+
active_flag=True,
30+
application_metadata=None,
3031
)
3132

32-
with MockVWS() as mock:
33-
mock.add_cloud_database(cloud_database=database)
34-
_ = vws_client.add_target(
35-
name=uuid.uuid4().hex,
36-
width=1,
37-
image=image_file_success_state_low_rating,
38-
active_flag=True,
39-
application_metadata=None,
40-
)
41-
42-
wait_for_image_numbers(
43-
vws_client=vws_client,
44-
active_images=0,
45-
inactive_images=0,
46-
failed_images=0,
47-
processing_images=1,
48-
)
33+
wait_for_image_numbers(
34+
vws_client=vws_client,
35+
active_images=0,
36+
inactive_images=0,
37+
failed_images=0,
38+
processing_images=1,
39+
)

0 commit comments

Comments
 (0)