示例#1
0
    def test_ec2_credentials_list(self, mock):
        '''
        Test if it return a list of ec2_credentials
        for a specific user (keystone ec2-credentials-list)
        '''
        self.assertDictEqual(keystone.ec2_credentials_list(),
                             {'Error': 'Unable to resolve user id'})

        self.assertDictEqual(keystone.ec2_credentials_list
                             (user_id='salt', profile='openstack1'),
                             {'salt': {'access': '', 'secret': '',
                                       'tenant_id': '', 'user_id': 'salt'}})
示例#2
0
    def test_ec2_credentials_list(self, mock):
        '''
        Test if it return a list of ec2_credentials
        for a specific user (keystone ec2-credentials-list)
        '''
        self.assertDictEqual(keystone.ec2_credentials_list(),
                             {'Error': 'Unable to resolve user id'})

        self.assertDictEqual(keystone.ec2_credentials_list
                             (user_id='salt', profile='openstack1'),
                             {'salt': {'access': '', 'secret': '',
                                       'tenant_id': '', 'user_id': 'salt'}})
示例#3
0
    def test_ec2_credentials_list(self):
        """
        Test if it return a list of ec2_credentials
        for a specific user (keystone ec2-credentials-list)
        """
        self.assertDictEqual(keystone.ec2_credentials_list(),
                             {"Error": "Unable to resolve user id"})

        self.assertDictEqual(
            keystone.ec2_credentials_list(user_id="salt",
                                          profile="openstack1"),
            {
                "salt": {
                    "access": "",
                    "secret": "",
                    "tenant_id": "",
                    "user_id": "salt"
                }
            },
        )