]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
tests: drop usage of SecurityGroupServerRpcApiMixin
authorRussell Bryant <rbryant@redhat.com>
Fri, 16 Jan 2015 15:29:04 +0000 (10:29 -0500)
committerRussell Bryant <rbryant@redhat.com>
Wed, 21 Jan 2015 14:49:28 +0000 (09:49 -0500)
Drop usage of SecurityGroupServerRpcApiMixin in the unit tests.
This is required to be able to eventually move this API into a
messaging namespace.  It needs to use its own messaging client
instance, instead of a different one it gets after being used as a
mixin.

Part of blueprint rpc-docs-and-namespaces.

Change-Id: I2b66545ebfe5e7acf0a89fac58dc22e72d0df099

neutron/tests/unit/test_security_groups_rpc.py

index d25d15812f6fea96b45de547a28b768d0682bdc1..e31fa2f441ee312d0ca0174fe52d5602bbacff24 100644 (file)
@@ -25,7 +25,6 @@ import webob.exc
 from neutron.agent.common import config
 from neutron.agent import firewall as firewall_base
 from neutron.agent.linux import iptables_manager
-from neutron.agent import rpc as agent_rpc
 from neutron.agent import securitygroups_rpc as sg_rpc
 from neutron.api.rpc.handlers import securitygroups_rpc
 from neutron.common import constants as const
@@ -1604,14 +1603,9 @@ class SecurityGroupAgentRpcWithDeferredRefreshTestCase(
         self.assertFalse(self.agent.prepare_devices_filter.called)
 
 
-class FakeSGRpcApi(agent_rpc.PluginApi,
-                   sg_rpc.SecurityGroupServerRpcApiMixin):
-    pass
-
-
 class SecurityGroupServerRpcApiTestCase(base.BaseTestCase):
     def test_security_group_rules_for_devices(self):
-        rpcapi = FakeSGRpcApi('fake_topic')
+        rpcapi = sg_rpc.SecurityGroupServerRpcApi('fake_topic')
 
         with contextlib.nested(
             mock.patch.object(rpcapi.client, 'call'),