summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Natsume <takanattie@gmail.com>2022-08-13 22:30:51 +0900
committerRodolfo Alonso <ralonsoh@redhat.com>2023-02-15 08:57:36 +0000
commit168902f7ac22cefa0cc6a73f6a5801a8fb9763d4 (patch)
treec41145c32d516738b7dd876a2b7b05b7cf1127f9
parentde8f74aec889e4d6398a228dc14d58c2b475cd86 (diff)
downloadneutron-168902f7ac22cefa0cc6a73f6a5801a8fb9763d4.tar.gz
Fix deprecation warnings in pkg_resources
Fix the following deprecation warnings. PkgResourcesDeprecationWarning: <MagicMock name='execute().split().__getitem__().__getitem__()' id='140417024565696'> 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 <takanattie@gmail.com> (cherry picked from commit 76cf6b4a9e9a8c8f7b01f44d787b66b9b894331b) (cherry picked from commit aaafcbef3367a8b937a0b3283170031384d5504f)
-rw-r--r--neutron/tests/unit/agent/l3/test_dvr_local_router.py1
1 files changed, 1 insertions, 0 deletions
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 7fa6497498..36cc1f792f 100644
--- a/neutron/tests/unit/agent/l3/test_dvr_local_router.py
+++ b/neutron/tests/unit/agent/l3/test_dvr_local_router.py
@@ -287,6 +287,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}]