Molodetz blogrol volgens DPP-template

This commit is contained in:
2026-10-05 09:36:20 +02:00
commit f290a4c766
277 changed files with 15758 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
# retoor <retoor@molodetz.nl>
import asyncio
import pytest
from molodetz.net_guard import UnsafeURL, guard_public_url
@pytest.mark.parametrize("url", ["http://127.0.0.1/", "http://localhost:8088/", "http://10.0.0.1/", "http://169.254.169.254/", "file:///etc/passwd", "ftp://example.com/"])
def test_private_and_odd_urls_are_refused(url):
with pytest.raises(UnsafeURL):
asyncio.run(guard_public_url(url))