From a26f04d711d9d875b2a246cc9ff4371a63c37e8b Mon Sep 17 00:00:00 2001 From: Takashi Natsume Date: Sat, 13 Aug 2022 22:30:51 +0900 Subject: [PATCH] Fix deprecation warnings in pkg_resources Fix the following deprecation warnings. PkgResourcesDeprecationWarning: is an invalid version and will not be supported in a future release DeprecationWarning: Creating a LegacyVersion has been deprecated and will be removed in the next major release Change-Id: I23540114120f6ea52754116cfaaeac35e09543b4 Closes-Bug: 1986428 Signed-off-by: Takashi Natsume (cherry picked from commit 76cf6b4a9e9a8c8f7b01f44d787b66b9b894331b) --- neutron/tests/unit/agent/l3/test_dvr_local_router.py | 1 + 1 file changed, 1 insertion(+) diff --git a/neutron/tests/unit/agent/l3/test_dvr_local_router.py b/neutron/tests/unit/agent/l3/test_dvr_local_router.py index ded27933d81..78057c4ea3d 100644 --- a/neutron/tests/unit/agent/l3/test_dvr_local_router.py +++ b/neutron/tests/unit/agent/l3/test_dvr_local_router.py @@ -303,6 +303,7 @@ class TestDvrRouterOperations(base.BaseTestCase): self.assertFalse(ri.floating_forward_rules(fip)) def test_floating_forward_rules(self): + self.utils_exec.return_value = "iptables v1.6.2 (legacy)" router = mock.MagicMock() router.get.return_value = [{'host': HOSTNAME}, {'host': mock.sentinel.otherhost}]