Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tests/mock_vws/fixtures/prepared_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from uuid import uuid4

import pytest
from beartype import beartype
from urllib3.filepost import encode_multipart_formdata
from vws import VWS
from vws_auth_tools import authorization_header, rfc_1123_date
Expand All @@ -22,6 +23,7 @@
VWQ_HOST = "https://cloudreco.vuforia.com"


@beartype
@RETRY_ON_TOO_MANY_REQUESTS
def _wait_for_target_processed(vws_client: VWS, target_id: str) -> None:
"""Wait for a target to be processed.
Expand Down
1 change: 1 addition & 0 deletions tests/mock_vws/fixtures/vuforia_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
LOGGER.setLevel(level=logging.DEBUG)


@beartype
@RETRY_ON_TOO_MANY_REQUESTS
def _delete_all_targets(*, database_keys: CloudDatabase) -> None:
"""Delete all targets.
Expand Down
3 changes: 3 additions & 0 deletions tests/mock_vws/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from urllib.parse import urljoin

import requests
from beartype import beartype
from PIL import Image
from requests.structures import CaseInsensitiveDict
from vws.response import Response
Expand Down Expand Up @@ -52,6 +53,7 @@ class Endpoint:
access_key: str
secret_key: str

@beartype
def send(self) -> Response:
"""Send the request."""
request = requests.Request(
Expand Down Expand Up @@ -81,6 +83,7 @@ def auth_header_content_type(self) -> str:
return full_content_type.split(sep=";")[0]


@beartype
def make_image_file(
file_format: str,
color_space: Literal["RGB", "CMYK"],
Expand Down
1 change: 1 addition & 0 deletions tests/mock_vws/utils/assertions.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ def assert_query_success(*, response: Response) -> None:
)


@beartype
def assert_vwq_failure(
*,
response: Response,
Expand Down
2 changes: 2 additions & 0 deletions tests/mock_vws/utils/usage_test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
import datetime
import io

from beartype import beartype
from vws import VWS
from vws.reports import TargetStatuses

from mock_vws.database import CloudDatabase


@beartype
def processing_time_seconds(
*,
vuforia_database: CloudDatabase,
Expand Down