From c3ed0bf34b8a77af4dd4e6d7a6991ce92b7f1aaf Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Mon, 23 Jan 2023 11:57:19 +0100 Subject: tests/mfex: Silence Blowfish/CAST5 deprecation warnings. On Fedora 37 (at least), MFEX unit tests are failing because of deprecation warnings: $ python3 tests/mfex_fuzzy.py test_traffic.pcap 2000 /usr/lib/python3.11/site-packages/scapy/layers/ipsec.py:471: CryptographyDeprecationWarning: Blowfish has been deprecated cipher=algorithms.Blowfish, /usr/lib/python3.11/site-packages/scapy/layers/ipsec.py:485: CryptographyDeprecationWarning: CAST5 has been deprecated cipher=algorithms.CAST5, Signed-off-by: Robin Jarry Signed-off-by: David Marchand Acked-by: Eelco Chaudron Signed-off-by: Ilya Maximets --- tests/mfex_fuzzy.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') diff --git a/tests/mfex_fuzzy.py b/tests/mfex_fuzzy.py index ee2183f8e..15f7f4e51 100755 --- a/tests/mfex_fuzzy.py +++ b/tests/mfex_fuzzy.py @@ -1,7 +1,15 @@ #!/usr/bin/python3 import sys +import warnings +import cryptography +warnings.filterwarnings( + "ignore", + category=cryptography.CryptographyDeprecationWarning, + message=r"(blowfish|cast5)", +) +# flake8: noqa: E402 from scapy.all import RandMAC, RandIP, PcapWriter, RandIP6, RandShort, fuzz from scapy.all import IPv6, Dot1Q, IP, Ether, UDP, TCP, random -- cgit v1.2.1