def test_that_when_getting_status_on_client_error_it_returns_error(self):
     '''
     Tests getting status failure
     '''
     self.conn.get_trail_status.side_effect = ClientError(error_content, 'get_trail_status')
     result = boto_cloudtrail.status(Name='testtrail', **conn_parameters)
     self.assertTrue('error' in result)
Exemple #2
0
 def test_that_when_getting_status_on_client_error_it_returns_error(self):
     '''
     Tests getting status failure
     '''
     self.conn.get_trail_status.side_effect = ClientError(error_content, 'get_trail_status')
     result = boto_cloudtrail.status(Name='testtrail', **conn_parameters)
     self.assertTrue('error' in result)
    def test_that_when_getting_status_it_returns_the_dict_of_properties_returns_false(self):
        '''
        Tests getting status if trail does not exist
        '''
        self.conn.get_trail_status.side_effect = not_found_error
        result = boto_cloudtrail.status(Name='testtrail', **conn_parameters)

        self.assertFalse(result['trail'])
 def test_that_when_getting_status_on_client_error_it_returns_error(self):
     """
     Tests getting status failure
     """
     self.conn.get_trail_status.side_effect = ClientError(
         error_content, "get_trail_status")
     result = boto_cloudtrail.status(Name="testtrail", **conn_parameters)
     self.assertTrue("error" in result)
Exemple #5
0
    def test_that_when_getting_status_it_returns_the_dict_of_properties_returns_false(self):
        '''
        Tests getting status if trail does not exist
        '''
        self.conn.get_trail_status.side_effect = not_found_error
        result = boto_cloudtrail.status(Name='testtrail', **conn_parameters)

        self.assertFalse(result['trail'])
    def test_that_when_getting_status_it_returns_the_dict_of_properties_returns_true(self):
        '''
        Tests getting status if trail exists
        '''
        self.conn.get_trail_status.return_value = status_ret

        result = boto_cloudtrail.status(Name=trail_ret['Name'], **conn_parameters)

        self.assertTrue(result['trail'])
Exemple #7
0
    def test_that_when_getting_status_it_returns_the_dict_of_properties_returns_false(
        self, ):
        """
        Tests getting status if trail does not exist
        """
        self.conn.get_trail_status.side_effect = not_found_error
        result = boto_cloudtrail.status(Name="testtrail", **conn_parameters)

        assert not result["trail"]
Exemple #8
0
    def test_that_when_getting_status_it_returns_the_dict_of_properties_returns_true(self):
        '''
        Tests getting status if trail exists
        '''
        self.conn.get_trail_status.return_value = status_ret

        result = boto_cloudtrail.status(Name=trail_ret['Name'], **conn_parameters)

        self.assertTrue(result['trail'])
    def test_that_when_getting_status_it_returns_the_dict_of_properties_returns_true(
        self,
    ):
        """
        Tests getting status if trail exists
        """
        self.conn.get_trail_status.return_value = status_ret

        result = boto_cloudtrail.status(Name=trail_ret["Name"], **conn_parameters)

        self.assertTrue(result["trail"])