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 commit76cf6b4a9e
) (cherry picked from commitaaafcbef33
)
This commit is contained in:
parent
3566cc065e
commit
35a5bc1fbb
|
@ -286,6 +286,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}]
|
||||
|
|
Loading…
Reference in New Issue