Squash Odysseus development history

This commit is contained in:
pewdiepie-archdaemon
2026-09-11 06:04:19 +00:00
parent e5c99a5eee
commit 6ee6502010
2050 changed files with 538359 additions and 57745 deletions
+18
View File
@@ -0,0 +1,18 @@
def test_gallery_url_normalization_bug():
from routes.gallery_routes import _normalize_image_endpoint_base
def check_match(ep_url: str, base_url: str) -> bool:
return (
_normalize_image_endpoint_base(ep_url)
== _normalize_image_endpoint_base(base_url)
)
# Test cases that SHOULD NOT match under a correct implementation
# (Buggy rstrip('/v1') logic incorrectly treats these as equal)
assert check_match("http://localhost:8000/v11", "http://localhost:8000") is False
assert check_match("http://localhost:8000/dev1", "http://localhost:8000/dev") is False
# Test cases that SHOULD match under a correct implementation
assert check_match("http://localhost:8000/v1", "http://localhost:8000") is True
assert check_match("http://localhost:8000", "http://localhost:8000/v1") is True
assert check_match("http://localhost:8000/v1/", "http://localhost:8000/v1") is True