Skip to content

Commit 04fcd0c

Browse files
committed
Passing test on get duplicates
1 parent 110062b commit 04fcd0c

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

tests/mock_vws/test_get_duplicates.py

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717
target_api_request,
1818
wait_for_target_processed,
1919
)
20-
from tests.mock_vws.utils.assertions import assert_vws_response
20+
from tests.mock_vws.utils.assertions import (
21+
assert_vws_failure,
22+
assert_vws_response,
23+
)
2124
from tests.mock_vws.utils.authorization import VuforiaDatabaseKeys
2225

2326

@@ -379,3 +382,28 @@ def test_processing(
379382

380383
assert status_response.json()['status'] == 'processing'
381384
assert response.json()['similar_targets'] == [processed_target_id]
385+
386+
387+
@pytest.mark.usefixtures('verify_mock_vuforia_inactive')
388+
class TestInactiveProject:
389+
"""
390+
Tests for inactive projects.
391+
"""
392+
393+
def test_inactive_project(
394+
self,
395+
inactive_database_keys: VuforiaDatabaseKeys,
396+
) -> None:
397+
"""
398+
If the project is inactive, a FORBIDDEN response is returned.
399+
"""
400+
response = target_duplicates(
401+
target_id=uuid.uuid4().hex,
402+
vuforia_database_keys=inactive_database_keys,
403+
)
404+
405+
assert_vws_failure(
406+
response=response,
407+
status_code=codes.FORBIDDEN,
408+
result_code=ResultCodes.PROJECT_INACTIVE,
409+
)

0 commit comments

Comments
 (0)