Beispiel #1
0
 def test_that_when_describing_lambda_on_client_error_it_returns_error(self):
     """
     Tests describing parameters failure
     """
     self.conn.list_aliases.side_effect = ClientError(error_content, "list_aliases")
     result = boto_lambda.describe_alias(FunctionName="testfunction", Name=alias_ret["Name"], **conn_parameters)
     self.assertTrue("error" in result)
Beispiel #2
0
    def test_that_when_describing_alias_it_returns_the_dict_of_properties_returns_false(self):
        """
        Tests describing parameters if alias does not exist
        """
        self.conn.list_aliases.return_value = {"Aliases": [alias_ret]}
        result = boto_lambda.describe_alias(FunctionName="testfunction", Name="othername", **conn_parameters)

        self.assertFalse(result["alias"])
 def test_that_when_describing_lambda_on_client_error_it_returns_error(self):
     """
     Tests describing parameters failure
     """
     self.conn.list_aliases.side_effect = ClientError(error_content, "list_aliases")
     result = boto_lambda.describe_alias(
         FunctionName="testfunction", Name=alias_ret["Name"], **conn_parameters
     )
     self.assertTrue("error" in result)
 def test_that_when_describing_lambda_on_client_error_it_returns_error(self):
     '''
     Tests describing parameters failure
     '''
     self.conn.list_aliases.side_effect = ClientError(error_content, 'list_aliases')
     result = boto_lambda.describe_alias(FunctionName='testfunction',
                                         Name=alias_ret['Name'],
                                         **conn_parameters)
     self.assertTrue('error' in result)
Beispiel #5
0
    def test_that_when_describing_alias_it_returns_the_dict_of_properties_returns_true(self):
        """
        Tests describing parameters if alias exists
        """
        self.conn.list_aliases.return_value = {"Aliases": [alias_ret]}

        result = boto_lambda.describe_alias(FunctionName="testfunction", Name=alias_ret["Name"], **conn_parameters)

        self.assertEqual(result, {"alias": alias_ret})
 def test_that_when_describing_lambda_on_client_error_it_returns_error(self):
     '''
     Tests describing parameters failure
     '''
     self.conn.list_aliases.side_effect = ClientError(error_content, 'list_aliases')
     result = boto_lambda.describe_alias(FunctionName='testfunction',
                                         Name=alias_ret['Name'],
                                         **conn_parameters)
     self.assertTrue('error' in result)
Beispiel #7
0
    def test_that_when_describing_alias_it_returns_the_dict_of_properties_returns_false(self):
        '''
        Tests describing parameters if alias does not exist
        '''
        self.conn.list_aliases.return_value = {'Aliases': [alias_ret]}
        result = boto_lambda.describe_alias(FunctionName='testfunction',
                                            Name='othername',
                                            **conn_parameters)

        self.assertFalse(result['alias'])
    def test_that_when_describing_alias_it_returns_the_dict_of_properties_returns_false(self):
        '''
        Tests describing parameters if alias does not exist
        '''
        self.conn.list_aliases.return_value = {'Aliases': [alias_ret]}
        result = boto_lambda.describe_alias(FunctionName='testfunction',
                                            Name='othername',
                                            **conn_parameters)

        self.assertFalse(result['alias'])
Beispiel #9
0
    def test_that_when_describing_alias_it_returns_the_dict_of_properties_returns_true(self):
        '''
        Tests describing parameters if alias exists
        '''
        self.conn.list_aliases.return_value = {'Aliases': [alias_ret]}

        result = boto_lambda.describe_alias(FunctionName='testfunction',
                                            Name=alias_ret['Name'],
                                            **conn_parameters)

        self.assertEqual(result, {'alias': alias_ret})
    def test_that_when_describing_alias_it_returns_the_dict_of_properties_returns_false(
        self, ):
        """
        Tests describing parameters if alias does not exist
        """
        self.conn.list_aliases.return_value = {"Aliases": [alias_ret]}
        result = boto_lambda.describe_alias(FunctionName="testfunction",
                                            Name="othername",
                                            **conn_parameters)

        self.assertFalse(result["alias"])
Beispiel #11
0
    def test_that_when_describing_alias_it_returns_the_dict_of_properties_returns_true(self):
        '''
        Tests describing parameters if alias exists
        '''
        self.conn.list_aliases.return_value = {'Aliases': [alias_ret]}

        result = boto_lambda.describe_alias(FunctionName='testfunction',
                                            Name=alias_ret['Name'],
                                            **conn_parameters)

        self.assertEqual(result, {'alias': alias_ret})
    def test_that_when_describing_alias_it_returns_the_dict_of_properties_returns_true(
        self, ):
        """
        Tests describing parameters if alias exists
        """
        self.conn.list_aliases.return_value = {"Aliases": [alias_ret]}

        result = boto_lambda.describe_alias(FunctionName="testfunction",
                                            Name=alias_ret["Name"],
                                            **conn_parameters)

        self.assertEqual(result, {"alias": alias_ret})