def setUp(self): super(TestSetSecurityGroupNetwork, self).setUp() self.network.update_security_group = mock.Mock(return_value=None) self.network.find_security_group = mock.Mock( return_value=self._security_group) # Get the command object to test self.cmd = security_group.SetSecurityGroup(self.app, self.namespace)
def setUp(self): super(TestSetSecurityGroupCompute, self).setUp() self.app.client_manager.network_endpoint_enabled = False self.compute.api.security_group_find = mock.Mock( return_value=self._security_group) # Get the command object to test self.cmd = security_group.SetSecurityGroup(self.app, None)