File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ optional-dependencies.dev = [
8282 " ty==0.0.17" ,
8383 " types-requests==2.32.4.20260107" ,
8484 " vulture==2.14" ,
85- " vws-python-mock==2026.2.22.1 " ,
85+ " vws-python-mock==2026.2.22.2 " ,
8686 " vws-test-fixtures==2023.3.5" ,
8787 " yamlfix==1.19.1" ,
8888 " zizmor==1.22.0" ,
Original file line number Diff line number Diff line change 22API.
33"""
44
5- from urllib .parse import urlparse
6-
75import requests
86from beartype import BeartypeConf , beartype
97from vws_auth_tools import authorization_header , rfc_1123_date
@@ -47,17 +45,14 @@ def target_api_request(
4745 """
4846 date_string = rfc_1123_date ()
4947
50- base_path = urlparse (url = base_vws_url ).path .rstrip ("/" )
51- full_request_path = base_path + request_path
52-
5348 signature_string = authorization_header (
5449 access_key = server_access_key ,
5550 secret_key = server_secret_key ,
5651 method = method ,
5752 content = data ,
5853 content_type = content_type ,
5954 date = date_string ,
60- request_path = full_request_path ,
55+ request_path = request_path ,
6156 )
6257
6358 headers = {
Original file line number Diff line number Diff line change 55import json
66from http import HTTPMethod , HTTPStatus
77from typing import Any , BinaryIO
8- from urllib .parse import urlparse
98
109import requests
1110from beartype import BeartypeConf , beartype
@@ -127,9 +126,6 @@ def query(
127126 content , content_type_header = encode_multipart_formdata (fields = body )
128127 method = HTTPMethod .POST
129128
130- base_path = urlparse (url = self ._base_vwq_url ).path .rstrip ("/" )
131- full_request_path = base_path + request_path
132-
133129 authorization_string = authorization_header (
134130 access_key = self ._client_access_key ,
135131 secret_key = self ._client_secret_key ,
@@ -138,7 +134,7 @@ def query(
138134 # Note that this is not the actual Content-Type header value sent.
139135 content_type = "multipart/form-data" ,
140136 date = date ,
141- request_path = full_request_path ,
137+ request_path = request_path ,
142138 )
143139
144140 headers = {
Original file line number Diff line number Diff line change 11"""Tests for helper functions for managing a Vuforia database."""
22
33import base64
4- import contextlib
54import datetime
65import io
76import secrets
1615
1716from vws import VWS , CloudRecoService , VuMarkService
1817from vws .exceptions .custom_exceptions import TargetProcessingTimeoutError
19- from vws .exceptions .vws_exceptions import UnknownTargetError
2018from vws .reports import (
2119 DatabaseSummaryReport ,
2220 TargetRecord ,
@@ -264,15 +262,7 @@ def test_custom_base_url_with_path_prefix() -> None:
264262 base_vws_url = base_vws_url ,
265263 )
266264
267- # MockVWS's path-length check in validate_target_id_exists
268- # does not account for a base URL path prefix, so it
269- # incorrectly treats the last path segment ("targets") as a
270- # target ID and raises UnknownTargetError.
271- # See https://github.com/VWS-Python/vws-python-mock/issues/2995
272- # The request did reach MockVWS (proving the prefix was
273- # preserved in the URL), so this exception is expected for now.
274- with contextlib .suppress (UnknownTargetError ):
275- assert vws_client .list_targets () == []
265+ assert vws_client .list_targets () == []
276266
277267
278268class TestListTargets :
You can’t perform that action at this time.
0 commit comments