|
4 | 4 |
|
5 | 5 | from __future__ import annotations |
6 | 6 |
|
7 | | -import time |
8 | 7 | import uuid |
9 | 8 | from http import HTTPStatus |
10 | 9 | from typing import TYPE_CHECKING |
|
13 | 12 | from mock_vws import MockVWS |
14 | 13 | from mock_vws.database import VuforiaDatabase |
15 | 14 | from mock_vws.states import States |
16 | | -from vws import VWS, CloudRecoService |
| 15 | +from vws import CloudRecoService |
17 | 16 | from vws.exceptions.base_exceptions import CloudRecoException |
18 | 17 | from vws.exceptions.cloud_reco_exceptions import ( |
19 | 18 | AuthenticationFailure, |
|
23 | 22 | RequestTimeTooSkewed, |
24 | 23 | ) |
25 | 24 | from vws.exceptions.custom_exceptions import ( |
26 | | - ActiveMatchingTargetsDeleteProcessing, |
27 | 25 | RequestEntityTooLarge, |
28 | 26 | ) |
29 | 27 |
|
@@ -79,32 +77,6 @@ def test_cloudrecoexception_inheritance() -> None: |
79 | 77 | assert issubclass(subclass, CloudRecoException) |
80 | 78 |
|
81 | 79 |
|
82 | | -def test_active_matching_targets_delete_processing( |
83 | | - vws_client: VWS, |
84 | | - cloud_reco_client: CloudRecoService, |
85 | | - high_quality_image: io.BytesIO, |
86 | | -) -> None: |
87 | | - """ |
88 | | - A ``ActiveMatchingTargetsDeleteProcessing`` exception is raised when a |
89 | | - target which has recently been deleted is matched. |
90 | | - """ |
91 | | - target_id = vws_client.add_target( |
92 | | - name="x", |
93 | | - width=1, |
94 | | - image=high_quality_image, |
95 | | - active_flag=True, |
96 | | - application_metadata=None, |
97 | | - ) |
98 | | - vws_client.wait_for_target_processed(target_id=target_id) |
99 | | - vws_client.delete_target(target_id=target_id) |
100 | | - # This matches the "query_recognizes_deletion_seconds" setting to |
101 | | - # ``MockVWS``. |
102 | | - query_recognizes_deletion_seconds = 2 |
103 | | - time.sleep(query_recognizes_deletion_seconds) |
104 | | - with pytest.raises(ActiveMatchingTargetsDeleteProcessing): |
105 | | - cloud_reco_client.query(image=high_quality_image) |
106 | | - |
107 | | - |
108 | 80 | def test_authentication_failure(high_quality_image: io.BytesIO) -> None: |
109 | 81 | """ |
110 | 82 | An ``AuthenticationFailure`` exception is raised when the client access key |
|
0 commit comments