Beispiel #1
0
    def setUp(self):
        super(TestListSecurityGroupRuleNetwork, self).setUp()

        self.network.find_security_group = mock.Mock(
            return_value=self._security_group)
        self.network.security_group_rules = mock.Mock(
            return_value=self._security_group_rules)

        # Get the command object to test
        self.cmd = security_group_rule.ListSecurityGroupRule(
            self.app, self.namespace)
    def setUp(self):
        super(TestListSecurityGroupRuleCompute, self).setUp()

        self.app.client_manager.network_endpoint_enabled = False

        self.compute.security_groups.get.return_value = \
            self._security_group
        self.compute.security_groups.list.return_value = \
            [self._security_group]

        # Get the command object to test
        self.cmd = security_group_rule.ListSecurityGroupRule(self.app, None)
Beispiel #3
0
    def setUp(self):
        super(TestListSecurityGroupRuleCompute, self).setUp()

        self.app.client_manager.network_endpoint_enabled = False

        self.compute.api.security_group_find = mock.Mock(
            return_value=self._security_group, )
        self.compute.api.security_group_list = mock.Mock(
            return_value=[self._security_group], )

        # Get the command object to test
        self.cmd = security_group_rule.ListSecurityGroupRule(self.app, None)