def test_cost_usage_source_is_reachable_no_access(self, mock_get_sts_access): """Verify that the cost usage source is authenticated and created.""" provider_interface = AWSProvider() with self.assertRaises(ValidationError): provider_interface.cost_usage_source_is_reachable( 'iam_arn', 'bucket_name')
def test_cost_usage_source_is_reachable_no_bucket(self, mock_get_sts_access): """Verify that the cost usage source is authenticated and created.""" provider_interface = AWSProvider() with self.assertRaises(ValidationError): credentials = {"role_arn": "arn:aws:s3:::my_s3_bucket"} data_source = {"bucket": None} provider_interface.cost_usage_source_is_reachable(credentials, data_source)
def test_cost_usage_source_is_reachable_no_arn(self): """Verify that the cost usage source is authenticated and created.""" provider_interface = AWSProvider() with self.assertRaises(ValidationError): credentials = {"role_arn": None} data_source = {"bucket": "bucket_name"} provider_interface.cost_usage_source_is_reachable(credentials, data_source)
def test_cost_usage_source_is_reachable_no_topics( self, mock_get_sts_access, mock_check_s3_access, mock_check_cost_report_access): """Verify that the cost usage source is authenticated and created.""" provider_interface = AWSProvider() try: provider_interface.cost_usage_source_is_reachable( 'iam_arn', 'bucket_name') except Exception: self.fail('Unexpected Error')
def test_cost_usage_source_is_reachable_no_topics( self, mock_get_sts_access, mock_check_s3_access, mock_check_cost_report_access ): """Verify that the cost usage source is authenticated and created.""" provider_interface = AWSProvider() try: credentials = {"role_arn": "arn:aws:s3:::my_s3_bucket"} data_source = {"bucket": "bucket_name"} provider_interface.cost_usage_source_is_reachable(credentials, data_source) except Exception: self.fail("Unexpected Error")
def test_cost_usage_source_is_reachable_no_arn(self): """Verify that the cost usage source is authenticated and created.""" provider_interface = AWSProvider() with self.assertRaises(ValidationError): provider_interface.cost_usage_source_is_reachable( None, "bucket_name")