Skip to content

Commit a101df2

Browse files
committed
Passing test on real for target summary
1 parent 6129b6b commit a101df2

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

tests/mock_vws/test_target_summary.py

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import base64
66
import datetime
77
import io
8+
import uuid
89

910
import pytest
1011
import pytz
@@ -18,7 +19,10 @@
1819
target_summary,
1920
wait_for_target_processed,
2021
)
21-
from tests.mock_vws.utils.assertions import assert_vws_response
22+
from tests.mock_vws.utils.assertions import (
23+
assert_vws_failure,
24+
assert_vws_response,
25+
)
2226
from tests.mock_vws.utils.authorization import VuforiaDatabaseKeys
2327

2428

@@ -242,3 +246,28 @@ def test_recognition(
242246
assert response.json()['total_recos'] == 0
243247
assert response.json()['current_month_recos'] == 0
244248
assert response.json()['previous_month_recos'] == 0
249+
250+
251+
@pytest.mark.usefixtures('verify_mock_vuforia_inactive')
252+
class TestInactiveProject:
253+
"""
254+
Tests for inactive projects.
255+
"""
256+
257+
def test_inactive_project(
258+
self,
259+
inactive_database_keys: VuforiaDatabaseKeys,
260+
) -> None:
261+
"""
262+
The project's active state does not affect getting a target.
263+
"""
264+
response = target_summary(
265+
target_id=uuid.uuid4().hex,
266+
vuforia_database_keys=inactive_database_keys,
267+
)
268+
269+
assert_vws_failure(
270+
response=response,
271+
status_code=codes.NOT_FOUND,
272+
result_code=ResultCodes.UNKNOWN_TARGET,
273+
)

0 commit comments

Comments
 (0)