Merge "Mocking ryu plugin notifier in ryu plugin test"

This commit is contained in:
Jenkins 2013-11-27 18:27:58 +00:00 committed by Gerrit Code Review
commit 1b33844d5f

View File

@ -13,6 +13,9 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import mock
from neutron import manager
from neutron.plugins.ryu.db import models_v2 as ryu_models_v2 # noqa from neutron.plugins.ryu.db import models_v2 as ryu_models_v2 # noqa
from neutron.tests.unit.ryu import fake_ryu from neutron.tests.unit.ryu import fake_ryu
from neutron.tests.unit import test_db_plugin as test_plugin from neutron.tests.unit import test_db_plugin as test_plugin
@ -27,6 +30,8 @@ class RyuPluginV2TestCase(test_plugin.NeutronDbPluginV2TestCase):
self.ryu_patcher.start() self.ryu_patcher.start()
super(RyuPluginV2TestCase, self).setUp(self._plugin_name) super(RyuPluginV2TestCase, self).setUp(self._plugin_name)
self.addCleanup(self.ryu_patcher.stop) self.addCleanup(self.ryu_patcher.stop)
plugin = manager.NeutronManager.get_plugin()
plugin.notifier = mock.Mock()
class TestRyuBasicGet(test_plugin.TestBasicGet, RyuPluginV2TestCase): class TestRyuBasicGet(test_plugin.TestBasicGet, RyuPluginV2TestCase):