Tests: fix (black) Python code

This commit is contained in:
Pierre Lalet 2022-02-03 10:21:22 +01:00
parent 07c6f1f9ec
commit 479ee9a034

View file

@ -902,9 +902,9 @@ def test_ipv4_udp_stun_change_port():
assert UDP in resp, "no UDP layer found" assert UDP in resp, "no UDP layer found"
udp = resp[UDP] udp = resp[UDP]
assert ( assert (
udp.sport == (dport + 1) % 2 ** 16 udp.sport == (dport + 1) % 2**16
), "expected answer from UDP/{}, got it from UDP/{}".format( ), "expected answer from UDP/{}, got it from UDP/{}".format(
(dport + 1) % 2 ** 16, udp.sport (dport + 1) % 2**16, udp.sport
) )
assert ( assert (
udp.dport == sport udp.dport == sport
@ -945,9 +945,9 @@ def test_ipv6_udp_stun_change_port():
assert UDP in resp, "expecting UDP layer in answer, got nothing" assert UDP in resp, "expecting UDP layer in answer, got nothing"
udp = resp[UDP] udp = resp[UDP]
assert ( assert (
udp.sport == (dport + 1) % 2 ** 16 udp.sport == (dport + 1) % 2**16
), "expected answer from UDP/{}, got it from UDP/{}".format( ), "expected answer from UDP/{}, got it from UDP/{}".format(
(dport + 1) % 2 ** 16, udp.sport (dport + 1) % 2**16, udp.sport
) )
assert ( assert (
udp.dport == sport udp.dport == sport