88import datetime
99import secrets
1010import uuid
11- from typing import TYPE_CHECKING , BinaryIO
11+ from typing import TYPE_CHECKING
1212
1313import pytest
1414from freezegun import freeze_time
@@ -38,7 +38,7 @@ class TestAddTarget:
3838 @pytest .mark .parametrize ("active_flag" , [True , False ])
3939 def test_add_target (
4040 vws_client : VWS ,
41- image : BinaryIO ,
41+ image : io . BytesIO | io . BufferedRandom ,
4242 application_metadata : bytes | None ,
4343 cloud_reco_client : CloudRecoService ,
4444 * ,
@@ -82,7 +82,7 @@ def test_add_target(
8282 @staticmethod
8383 def test_add_two_targets (
8484 vws_client : VWS ,
85- image : io .BytesIO ,
85+ image : io .BytesIO | io . BufferedRandom ,
8686 ) -> None :
8787 """
8888 No exception is raised when adding two targets with different names.
@@ -105,7 +105,7 @@ class TestCustomBaseVWSURL:
105105 """
106106
107107 @staticmethod
108- def test_custom_base_url (image : io .BytesIO ) -> None :
108+ def test_custom_base_url (image : io .BytesIO | io . BufferedRandom ) -> None :
109109 """
110110 It is possible to use add a target to a database under a custom VWS
111111 URL.
@@ -137,7 +137,7 @@ class TestListTargets:
137137 @staticmethod
138138 def test_list_targets (
139139 vws_client : VWS ,
140- image : io .BytesIO ,
140+ image : io .BytesIO | io . BufferedRandom ,
141141 ) -> None :
142142 """
143143 It is possible to get a list of target IDs.
@@ -167,7 +167,7 @@ class TestDelete:
167167 @staticmethod
168168 def test_delete_target (
169169 vws_client : VWS ,
170- image : io .BytesIO ,
170+ image : io .BytesIO | io . BufferedRandom ,
171171 ) -> None :
172172 """
173173 It is possible to delete a target.
@@ -194,7 +194,7 @@ class TestGetTargetSummaryReport:
194194 @staticmethod
195195 def test_get_target_summary_report (
196196 vws_client : VWS ,
197- image : io .BytesIO ,
197+ image : io .BytesIO | io . BufferedRandom ,
198198 ) -> None :
199199 """
200200 Details of a target are returned by ``get_target_summary_report``.
@@ -263,7 +263,7 @@ class TestGetTargetRecord:
263263 @staticmethod
264264 def test_get_target_record (
265265 vws_client : VWS ,
266- image : io .BytesIO ,
266+ image : io .BytesIO | io . BufferedRandom ,
267267 ) -> None :
268268 """
269269 Details of a target are returned by ``get_target_record``.
@@ -298,7 +298,7 @@ class TestWaitForTargetProcessed:
298298 @staticmethod
299299 def test_wait_for_target_processed (
300300 vws_client : VWS ,
301- image : io .BytesIO ,
301+ image : io .BytesIO | io . BufferedRandom ,
302302 ) -> None :
303303 """
304304 It is possible to wait until a target is processed.
@@ -318,7 +318,7 @@ def test_wait_for_target_processed(
318318
319319 @staticmethod
320320 def test_default_seconds_between_requests (
321- image : io .BytesIO ,
321+ image : io .BytesIO | io . BufferedRandom ,
322322 ) -> None :
323323 """
324324 By default, 0.2 seconds are waited between polling requests.
@@ -370,7 +370,7 @@ def test_default_seconds_between_requests(
370370
371371 @staticmethod
372372 def test_custom_seconds_between_requests (
373- image : io .BytesIO ,
373+ image : io .BytesIO | io . BufferedRandom ,
374374 ) -> None :
375375 """
376376 It is possible to customize the time waited between polling requests.
@@ -421,7 +421,7 @@ def test_custom_seconds_between_requests(
421421 assert report .request_usage == expected_requests
422422
423423 @staticmethod
424- def test_custom_timeout (image : io .BytesIO ) -> None :
424+ def test_custom_timeout (image : io .BytesIO | io . BufferedRandom ) -> None :
425425 """
426426 It is possible to set a maximum timeout.
427427 """
@@ -465,7 +465,7 @@ class TestGetDuplicateTargets:
465465 @staticmethod
466466 def test_get_duplicate_targets (
467467 vws_client : VWS ,
468- image : io .BytesIO ,
468+ image : io .BytesIO | io . BufferedRandom ,
469469 ) -> None :
470470 """
471471 It is possible to get the IDs of similar targets.
@@ -499,8 +499,8 @@ class TestUpdateTarget:
499499 @staticmethod
500500 def test_update_target (
501501 vws_client : VWS ,
502- image : io .BytesIO ,
503- different_high_quality_image : io .BytesIO ,
502+ image : io .BytesIO | io . BufferedRandom ,
503+ different_high_quality_image : io .BytesIO | io . BufferedRandom ,
504504 cloud_reco_client : CloudRecoService ,
505505 ) -> None :
506506 """
@@ -558,7 +558,7 @@ def test_update_target(
558558 @staticmethod
559559 def test_no_fields_given (
560560 vws_client : VWS ,
561- image : io .BytesIO ,
561+ image : io .BytesIO | io . BufferedRandom ,
562562 ) -> None :
563563 """
564564 It is possible to give no update fields.
0 commit comments