Improve readability of MagicMock use in RYU test

Replaces an unnecessarily complex setup of a magicmock
in an RYU test module.

Change-Id: If2e99ff76114d896a6480a884a531f901198caa5
This commit is contained in:
Kevin Benton 2014-05-29 21:15:22 -07:00
parent e65b06f458
commit beccd7cda8
1 changed files with 1 additions and 4 deletions

View File

@ -38,10 +38,7 @@ class RyuSecurityGroupsTestCase(test_sg.SecurityGroupDBTestCase):
def setUp(self, plugin=None):
test_sg_rpc.set_firewall_driver(test_sg_rpc.FIREWALL_HYBRID_DRIVER)
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.notifier = mock.patch(NOTIFIER).start().return_value
self._attribute_map_bk_ = {}
for item in attributes.RESOURCE_ATTRIBUTE_MAP:
self._attribute_map_bk_[item] = (attributes.