File tree Expand file tree Collapse file tree 3 files changed +36
-100
lines changed
Expand file tree Collapse file tree 3 files changed +36
-100
lines changed Original file line number Diff line number Diff line change @@ -206,20 +206,3 @@ def endpoint(request: SubRequest) -> Endpoint:
206206 """
207207 endpoint_fixture : Endpoint = request .getfixturevalue (request .param )
208208 return endpoint_fixture
209-
210-
211- @pytest .fixture (
212- params = [
213- '_add_target' ,
214- '_database_summary' ,
215- '_target_list' ,
216- '_query' ,
217- ],
218- )
219- def endpoint_success_no_target_id (request : SubRequest ) -> Endpoint :
220- """
221- Return details of an endpoint for the Target API or the Query API which
222- does not require a target ID for success.
223- """
224- endpoint_fixture : Endpoint = request .getfixturevalue (request .param )
225- return endpoint_fixture
Original file line number Diff line number Diff line change @@ -834,3 +834,39 @@ def test_metadata_too_large(
834834 status_code = codes .UNPROCESSABLE_ENTITY ,
835835 result_code = ResultCodes .METADATA_TOO_LARGE ,
836836 )
837+
838+
839+ @pytest .mark .usefixtures ('verify_mock_vuforia_inactive' )
840+ class TestInactiveProject :
841+ """
842+ Tests for inactive projects.
843+ """
844+
845+ def test_inactive_project (
846+ self ,
847+ inactive_database_keys : VuforiaDatabaseKeys ,
848+ png_rgb : io .BytesIO ,
849+ ) -> None :
850+ """
851+ The project's active state does not affect the database summary.
852+ """
853+ image_data = png_rgb .read ()
854+ image_data_encoded = base64 .b64encode (image_data ).decode ('ascii' )
855+
856+ data = {
857+ 'name' : 'example' ,
858+ 'width' : 1 ,
859+ 'image' : image_data_encoded ,
860+ }
861+
862+ response = add_target_to_vws (
863+ vuforia_database_keys = inactive_database_keys ,
864+ data = data ,
865+ content_type = 'application/json' ,
866+ )
867+
868+ assert_vws_failure (
869+ response = response ,
870+ status_code = codes .UNPROCESSABLE_ENTITY ,
871+ result_code = ResultCodes .METADATA_TOO_LARGE ,
872+ )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments