def setUp(self, plugin=None): test_sg_rpc.set_firewall_driver(test_sg_rpc.FIREWALL_HYBRID_DRIVER) self.addCleanup(mock.patch.stopall) self.fake_ryu = fake_ryu.patch_fake_ryu_client().start() notifier_p = mock.patch(NOTIFIER) notifier_cls = notifier_p.start() self.notifier = mock.Mock() notifier_cls.return_value = self.notifier self._attribute_map_bk_ = {} for item in attributes.RESOURCE_ATTRIBUTE_MAP: self._attribute_map_bk_[item] = ( attributes.RESOURCE_ATTRIBUTE_MAP[item].copy()) super(RyuSecurityGroupsTestCase, self).setUp(PLUGIN_NAME)
def setUp(self, plugin=None): test_sg_rpc.set_firewall_driver(test_sg_rpc.FIREWALL_HYBRID_DRIVER) self.addCleanup(mock.patch.stopall) self.fake_ryu = fake_ryu.patch_fake_ryu_client().start() notifier_p = mock.patch(NOTIFIER) notifier_cls = notifier_p.start() self.notifier = mock.Mock() notifier_cls.return_value = self.notifier self._attribute_map_bk_ = {} for item in attributes.RESOURCE_ATTRIBUTE_MAP: self._attribute_map_bk_[item] = (attributes. RESOURCE_ATTRIBUTE_MAP[item]. copy()) super(RyuSecurityGroupsTestCase, self).setUp(PLUGIN_NAME)
def setUp(self): super(RyuAgentTestCase, self).setUp() self.addCleanup(mock.patch.stopall) self.fake_ryu = fake_ryu.patch_fake_ryu_client().start() self.mod_agent = importutils.import_module(self._AGENT_NAME)
def setUp(self): self.ryu_patcher = fake_ryu.patch_fake_ryu_client() self.ryu_patcher.start() super(RyuPluginV2TestCase, self).setUp(self._plugin_name) self.addCleanup(self.ryu_patcher.stop)