Skip to content

Commit e0c2cc2

Browse files
committed
Removed redundant test assertions
1 parent 73360e8 commit e0c2cc2

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

pfsense_redactor/redactor.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@
1313
from pathlib import Path
1414
from collections import defaultdict
1515
from collections.abc import Callable
16+
from typing import TypeAlias
1617
from urllib.parse import urlsplit, urlunsplit, SplitResult
1718

1819
# Type aliases for clarity
19-
IPAddress = "ipaddress.IPv4Address | ipaddress.IPv6Address"
20-
IPNetwork = "ipaddress.IPv4Network | ipaddress.IPv6Network"
20+
IPAddress: TypeAlias = ipaddress.IPv4Address | ipaddress.IPv6Address
21+
IPNetwork: TypeAlias = ipaddress.IPv4Network | ipaddress.IPv6Network
2122

2223
# Module-level constants (immutable for safety)
2324
ALWAYS_PRESERVE_IPS: frozenset[str] = frozenset({

tests/unit/test_url_handling.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ def test_file_url_local_path_preserved(self, basic_redactor):
142142

143143
# file:// URLs without hostnames should be preserved exactly
144144
assert result == url
145-
assert "example.com" not in result
146145

147146
def test_file_url_windows_path_preserved(self, basic_redactor):
148147
"""Verify that file:// URLs with Windows paths are preserved"""
@@ -151,7 +150,6 @@ def test_file_url_windows_path_preserved(self, basic_redactor):
151150

152151
# Should be preserved exactly, not transformed to network path
153152
assert result == url
154-
assert "example.com" not in result
155153

156154
def test_file_url_with_hostname_redacted(self, basic_redactor):
157155
"""Verify that file:// URLs with actual hostnames are redacted"""
@@ -170,7 +168,6 @@ def test_nfs_url_without_hostname_preserved(self, basic_redactor):
170168

171169
# Should be preserved unchanged
172170
assert result == url
173-
assert "example.com" not in result
174171

175172
def test_smb_url_without_hostname_preserved(self, basic_redactor):
176173
"""Verify that SMB URLs without hostnames are preserved"""
@@ -179,7 +176,6 @@ def test_smb_url_without_hostname_preserved(self, basic_redactor):
179176

180177
# Should be preserved unchanged
181178
assert result == url
182-
assert "example.com" not in result
183179

184180
def test_smb_url_with_credentials_redacted(self, basic_redactor):
185181
"""Verify that SMB URLs with credentials are properly redacted"""

0 commit comments

Comments
 (0)