Merge "Fix assignment-from-none warnings"

This commit is contained in:
Zuul 2023-12-06 06:30:45 +00:00 committed by Gerrit Code Review
commit 3238bcb44d
2 changed files with 6 additions and 4 deletions

View File

@ -142,10 +142,13 @@ class TcLibTestCase(functional_base.BaseSudoTestCase):
common_constants.INGRESS_DIRECTION,
ip_addr)
self.assertIsNotNone(filter_id)
filter_id = l3_tc.clear_ip_rate_limit(
l3_tc.clear_ip_rate_limit(
common_constants.INGRESS_DIRECTION,
ip_addr)
self.assertIsNone(filter_id)
self.assertRaises(exceptions.FilterIDForIPNotFound,
l3_tc.get_filter_id_for_ip,
common_constants.INGRESS_DIRECTION,
ip_addr)
# testing: IP filter does not exist
l3_tc.clear_ip_rate_limit(

View File

@ -122,8 +122,7 @@ class FlatTypeTest(testlib_api.SqlTestCase):
self.context, segment)
def test_allocate_tenant_segment(self):
observed = self.driver.allocate_tenant_segment(self.context)
self.assertIsNone(observed)
self.assertIsNone(self.driver.allocate_tenant_segment(self.context))
def test_get_mtu(self):
cfg.CONF.set_override('global_physnet_mtu', 1475)