File tree Expand file tree Collapse file tree 1 file changed +29
-1
lines changed
Expand file tree Collapse file tree 1 file changed +29
-1
lines changed Original file line number Diff line number Diff line change 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+ )
2124from 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+ )
You can’t perform that action at this time.
0 commit comments