Skip to content

Commit 7711b1f

Browse files
committed
Fix dhcpd IPython test
1 parent fa7d1d5 commit 7711b1f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

test/scapy/layers/dhcp.uts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,5 +125,14 @@ assert DHCPRevOptions['static-routes'][0] == 33
125125

126126
assert dhcpd
127127
import IPython
128-
assert IPython.lib.pretty.pretty(dhcpd) == '<function scapy.ansmachine.dhcpd(self, pool=Net("192.168.1.128/25"), network=\'192.168.1.0/24\', gw=\'192.168.1.1\', nameserver=None, domain=None, renewal_time=60, lease_time=1800, **kwargs)>'
128+
129+
result = IPython.lib.pretty.pretty(dhcpd)
130+
result
131+
132+
# 3 results depending on the Python version
133+
assert result in [
134+
'<function scapy.ansmachine.dhcpd(self, pool: Union[scapy.base_classes.Net, List[str]] = Net("192.168.1.128/25"), network: str = \'192.168.1.0/24\', gw: str = \'192.168.1.1\', nameserver: Union[str, List[str]] = None, domain: Optional[str] = None, renewal_time: int = 60, lease_time: int = 1800, **kwargs)>',
135+
'<function scapy.ansmachine.dhcpd(self, pool: Union[scapy.base_classes.Net, List[str]] = Net("192.168.1.128/25"), network: str = \'192.168.1.0/24\', gw: str = \'192.168.1.1\', nameserver: Union[str, List[str]] = None, domain: Union[str, NoneType] = None, renewal_time: int = 60, lease_time: int = 1800, **kwargs)>',
136+
'<function scapy.ansmachine.dhcpd(self, pool=Net("192.168.1.128/25"), network=\'192.168.1.0/24\', gw=\'192.168.1.1\', nameserver=None, domain=None, renewal_time=60, lease_time=1800, **kwargs)>',
137+
]
129138

0 commit comments

Comments
 (0)