Merge "l3: an unit test for set_extra_attr_value"

This commit is contained in:
Zuul 2018-02-23 12:12:59 +00:00 committed by Gerrit Code Review
commit 8e3730538c

View File

@ -581,6 +581,11 @@ class ExtraAttributesMixinTestCase(testlib_api.SqlTestCase):
self.mixin.set_extra_attr_value(self.ctx, self.router, self.mixin.set_extra_attr_value(self.ctx, self.router,
'bad', 'value') 'bad', 'value')
def test_set_attrs_and_extend_no_transaction(self):
with testtools.ExpectedException(RuntimeError):
self.mixin.set_extra_attr_value(self.ctx, self.router,
'ha_vr_id', 99)
def test__extend_extra_router_dict_defaults(self): def test__extend_extra_router_dict_defaults(self):
rdict = {} rdict = {}
self.mixin._extend_extra_router_dict(rdict, self.router) self.mixin._extend_extra_router_dict(rdict, self.router)