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 76cf6b4a9e
)
This commit is contained in:
parent
b35f24b91e
commit
a26f04d711
|
@ -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}]
|
||||
|
|
Loading…
Reference in New Issue