You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 30, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 30, 2026. It is now read-only.
MockVWS drops path prefix from base URLs (urljoin bug) #2993
Because route.path_pattern starts with / (e.g. /targets, /v1/query), Python's urljoin silently discards any path component in the base URL. So if a user configures MockVWS(base_vws_url="http://localhost/prefix"), the mock registers handlers at http://localhost/targets instead of http://localhost/prefix/targets.
The same issue affects base_vwq_url.
Impact
A client library fixed to use string concatenation (base_url.rstrip("/") + path) instead of urljoin (as done in vws-python#2867) will send requests to http://localhost/prefix/targets, which the mock won't intercept, causing ConnectionError.
This makes it impossible to write a positive integration test for path-prefix base URL support without bypassing MockVWS entirely.
Fix
Replace the urljoin call in the route-registration code with string concatenation:
Activity
adamtheturtle commentedon Feb 22, 2026
Fixed in #2994, released in 2026.02.22.1.