This commit is contained in:
claudi 2026-02-19 15:16:05 +01:00
parent a20f703554
commit d799339d93
7 changed files with 29 additions and 29 deletions

View file

@ -19,7 +19,7 @@ def test_config(tmp_path):
log_file=None,
allowed_roots=[tmp_path],
allowed_urls=[],
webapp_url="https://wps.agravity.io/",
webapp_url="https://dev.agravity.io/",
url_mappings=[],
check_file_exists=True,
)
@ -135,7 +135,7 @@ class TestDragInterceptorAzureURL:
webapp_url="https://test.com/",
url_mappings=[
URLMapping(
url_prefix="https://wpsagravitystg.file.core.windows.net/wpsagravitysync/",
url_prefix="https://devagravitystg.file.core.windows.net/devagravitysync/",
local_path=str(tmp_path)
)
],
@ -144,7 +144,7 @@ class TestDragInterceptorAzureURL:
interceptor = DragInterceptor(config)
# Azure URL
azure_url = "https://wpsagravitystg.file.core.windows.net/wpsagravitysync/test.png"
azure_url = "https://devagravitystg.file.core.windows.net/devagravitysync/test.png"
# Mock the drag operation
with patch("webdrop_bridge.core.drag_interceptor.QDrag") as mock_drag:

View file

@ -18,10 +18,10 @@ def test_config():
log_file=None,
allowed_roots=[],
allowed_urls=[],
webapp_url="https://wps.agravity.io/",
webapp_url="https://dev.agravity.io/",
url_mappings=[
URLMapping(
url_prefix="https://wpsagravitystg.file.core.windows.net/wpsagravitysync/",
url_prefix="https://devagravitystg.file.core.windows.net/devagravitysync/",
local_path="Z:"
),
URLMapping(
@ -40,7 +40,7 @@ def converter(test_config):
def test_convert_simple_url(converter):
"""Test converting a simple Azure URL to local path."""
url = "https://wpsagravitystg.file.core.windows.net/wpsagravitysync/test/file.png"
url = "https://devagravitystg.file.core.windows.net/devagravitysync/test/file.png"
result = converter.convert_url_to_path(url)
assert result is not None
@ -49,7 +49,7 @@ def test_convert_simple_url(converter):
def test_convert_url_with_special_characters(converter):
"""Test URL with special characters (URL encoded)."""
url = "https://wpsagravitystg.file.core.windows.net/wpsagravitysync/folder/file%20with%20spaces.png"
url = "https://devagravitystg.file.core.windows.net/devagravitysync/folder/file%20with%20spaces.png"
result = converter.convert_url_to_path(url)
assert result is not None
@ -58,7 +58,7 @@ def test_convert_url_with_special_characters(converter):
def test_convert_url_with_subdirectories(converter):
"""Test URL with deep directory structure."""
url = "https://wpsagravitystg.file.core.windows.net/wpsagravitysync/aN5PysnXIuRECzcRbvHkjL7g0/subfolder/file.png"
url = "https://devagravitystg.file.core.windows.net/devagravitysync/aN5PysnXIuRECzcRbvHkjL7g0/subfolder/file.png"
result = converter.convert_url_to_path(url)
assert result is not None
@ -88,7 +88,7 @@ def test_convert_none_url(converter):
def test_is_azure_url_positive(converter):
"""Test recognizing valid Azure URLs."""
url = "https://wpsagravitystg.file.core.windows.net/wpsagravitysync/file.png"
url = "https://devagravitystg.file.core.windows.net/devagravitysync/file.png"
assert converter.is_azure_url(url) is True
@ -101,7 +101,7 @@ def test_is_azure_url_negative(converter):
def test_multiple_mappings(converter):
"""Test that correct mapping is used for URL."""
url1 = "https://wpsagravitystg.file.core.windows.net/wpsagravitysync/file.png"
url1 = "https://devagravitystg.file.core.windows.net/devagravitysync/file.png"
url2 = "https://other.blob.core.windows.net/container/file.png"
result1 = converter.convert_url_to_path(url1)
@ -133,7 +133,7 @@ def test_url_mapping_adds_trailing_slash():
def test_convert_url_example_from_docs(converter):
"""Test the exact example from documentation."""
url = "https://wpsagravitystg.file.core.windows.net/wpsagravitysync/aN5PysnXIuRECzcRbvHkjL7g0/Hintergrund_Agravity.png"
url = "https://devagravitystg.file.core.windows.net/devagravitysync/aN5PysnXIuRECzcRbvHkjL7g0/Hintergrund_Agravity.png"
result = converter.convert_url_to_path(url)
assert result is not None