Skip to content

Commit 110062b

Browse files
committed
Passing test on get
1 parent 1b58c6e commit 110062b

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

tests/mock_vws/test_get_target.py

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import base64
88
import io
9+
import uuid
910

1011
import pytest
1112
from requests import codes
@@ -16,7 +17,10 @@
1617
get_vws_target,
1718
wait_for_target_processed,
1819
)
19-
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+
)
2024
from tests.mock_vws.utils.authorization import VuforiaDatabaseKeys
2125

2226

@@ -249,3 +253,28 @@ def test_success_status(
249253
new_target_record = response.json()['target_record']
250254
new_tracking_rating = new_target_record['tracking_rating']
251255
assert new_tracking_rating == tracking_rating
256+
257+
258+
@pytest.mark.usefixtures('verify_mock_vuforia_inactive')
259+
class TestInactiveProject:
260+
"""
261+
Tests for inactive projects.
262+
"""
263+
264+
def test_inactive_project(
265+
self,
266+
inactive_database_keys: VuforiaDatabaseKeys,
267+
) -> None:
268+
"""
269+
The project's active state does not affect getting a target.
270+
"""
271+
response = get_vws_target(
272+
target_id=uuid.uuid4().hex,
273+
vuforia_database_keys=inactive_database_keys,
274+
)
275+
276+
assert_vws_failure(
277+
response=response,
278+
status_code=codes.NOT_FOUND,
279+
result_code=ResultCodes.UNKNOWN_TARGET,
280+
)

0 commit comments

Comments
 (0)