Skip to content

Commit 06ee8e6

Browse files
committed
Remove tests which will not be necessary
1 parent 73ac833 commit 06ee8e6

File tree

2 files changed

+0
-73
lines changed

2 files changed

+0
-73
lines changed

tests/mock_vws/test_add_target.py

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -542,42 +542,6 @@ def test_png_too_large(
542542
result_code=ResultCodes.IMAGE_TOO_LARGE,
543543
)
544544

545-
def test_too_large_and_corrupted(
546-
self,
547-
vuforia_database_keys: VuforiaDatabaseKeys,
548-
png_large: io.BytesIO,
549-
) -> None:
550-
"""
551-
An `ImageTooLarge` result is returned if the image is above a certain
552-
threshold and is corrupted.
553-
554-
This threshold is documented as being 2 MB but it is actually
555-
slightly larger. See the `png_large` fixture for more details.
556-
"""
557-
original_data = png_large.getvalue()
558-
longer_data = original_data.replace(b'IEND', b'\x00' + b'IEND')
559-
too_large_file = io.BytesIO(longer_data)
560-
561-
image_data = too_large_file.read()
562-
image_data_encoded = base64.b64encode(image_data).decode('ascii')
563-
564-
data = {
565-
'name': 'example_name',
566-
'width': 1,
567-
'image': image_data_encoded,
568-
}
569-
570-
response = add_target_to_vws(
571-
vuforia_database_keys=vuforia_database_keys,
572-
data=data,
573-
)
574-
575-
assert_vws_failure(
576-
response=response,
577-
status_code=codes.UNPROCESSABLE_ENTITY,
578-
result_code=ResultCodes.IMAGE_TOO_LARGE,
579-
)
580-
581545
def test_not_base64_encoded(
582546
self,
583547
vuforia_database_keys: VuforiaDatabaseKeys,

tests/mock_vws/test_update_target.py

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -796,43 +796,6 @@ def test_corrupted(
796796
result_code=ResultCodes.SUCCESS,
797797
)
798798

799-
def test_too_large_and_corrupted(
800-
self,
801-
vuforia_database_keys: VuforiaDatabaseKeys,
802-
png_large: io.BytesIO,
803-
target_id: str,
804-
) -> None:
805-
"""
806-
An `ImageTooLarge` result is returned if the image is above a certain
807-
threshold and is corrupted.
808-
809-
This threshold is documented as being 2 MB but it is actually
810-
slightly larger. See the `png_large` fixture for more details.
811-
"""
812-
original_data = png_large.getvalue()
813-
longer_data = original_data.replace(b'IEND', b'\x00' + b'IEND')
814-
too_large_file = io.BytesIO(longer_data)
815-
816-
image_data = too_large_file.read()
817-
image_data_encoded = base64.b64encode(image_data).decode('ascii')
818-
819-
wait_for_target_processed(
820-
vuforia_database_keys=vuforia_database_keys,
821-
target_id=target_id,
822-
)
823-
824-
response = update_target(
825-
vuforia_database_keys=vuforia_database_keys,
826-
data={'image': image_data_encoded},
827-
target_id=target_id,
828-
)
829-
830-
assert_vws_failure(
831-
response=response,
832-
status_code=codes.UNPROCESSABLE_ENTITY,
833-
result_code=ResultCodes.IMAGE_TOO_LARGE,
834-
)
835-
836799
def test_not_base64_encoded(
837800
self,
838801
vuforia_database_keys: VuforiaDatabaseKeys,

0 commit comments

Comments
 (0)