extra refactoring

This commit is contained in:
FUFSoB committed 2026-04-19 12:09:21 +05:00
1 parent 078367d919
commit 744a769e73
14 files changed
+943 -1230

No files matched your search

+4 -5
View File
@@ -17,15 +17,13 @@ def _make_b64_payload(*uris: str) -> bytes:
return base64.b64encode(text.encode())
def run_fetcher(server_data: bytes, tag_prefix: str = "test", *, routing_mark: int | None = None):
def run_fetcher(
server_data: bytes, tag_prefix: str = "test", *, routing_mark: int | None = None
):
lines = decode_subscription(server_data)
return parse_subscription(lines, tag_prefix, routing_mark)
# ---------------------------------------------------------------------------
# Tests
# ---------------------------------------------------------------------------
class FetchSubscriptionTests(unittest.TestCase):
def test_base64_payload_mixed_protocols(self):
@@ -59,6 +57,7 @@ class FetchSubscriptionTests(unittest.TestCase):
tag = obs[0]["tag"]
# Tag must contain only safe characters
import re
self.assertRegex(tag, r"^[a-zA-Z0-9_/\-]+$")
def test_tag_deduplication(self):