File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 55import base64
66import binascii
77import io
8+ import uuid
89from typing import Any , Union
910
1011import pytest
@@ -960,3 +961,33 @@ def test_rating_can_change(
960961 assert new_tracking_rating in range (6 )
961962
962963 assert original_tracking_rating != new_tracking_rating
964+
965+
966+ @pytest .mark .usefixtures ('verify_mock_vuforia_inactive' )
967+ class TestInactiveProject :
968+ """
969+ Tests for inactive projects.
970+ """
971+
972+ def test_inactive_project (
973+ self ,
974+ inactive_database_keys : VuforiaDatabaseKeys ,
975+ high_quality_image : io .BytesIO ,
976+ ) -> None :
977+ """
978+ If the project is inactive, a FORBIDDEN response is returned.
979+ """
980+ image = high_quality_image .read ()
981+ image_data_encoded = base64 .b64encode (image ).decode ('ascii' )
982+
983+ response = update_target (
984+ vuforia_database_keys = inactive_database_keys ,
985+ data = {'image' : image_data_encoded },
986+ target_id = uuid .uuid4 ().hex ,
987+ )
988+
989+ assert_vws_failure (
990+ response = response ,
991+ status_code = codes .FORBIDDEN ,
992+ result_code = ResultCodes .PROJECT_INACTIVE ,
993+ )
You can’t perform that action at this time.
0 commit comments