docstr: LocalFileDriver - Save and Load Credentials, Static
docstr_tok: ["LocalFileDriver","-","Save","and","Load","Credentials",",","Static"]
code: def test_save_and_load_credentials_persists_statically(self):
      """LocalFileDriver - Save and Load Credentials, Static"""
      raw_credentials = "aaaa"
      descriptor = "descriptor"
  
      encrypted_raw_credentials = encrypt_with_kms(
          raw_credentials, REGION, KMS_ALIAS
      )
  
      credentials = Credentials(encrypted_raw_credentials, True, REGION)
      assert_true(
          self._fs_driver.save_credentials(descriptor, credentials)
      )
  
      driver2 = LocalFileDriver(
          REGION, "service"
      )  # Create a separate, identical driver
      loaded_credentials = driver2.load_credentials(descriptor)
  
      assert_is_not_none(loaded_credentials)
      assert_true(loaded_credentials.is_encrypted())
      assert_equal(
          loaded_credentials.get_data_kms_decrypted(),
          raw_credentials.encode(),
      )
  
imports: import json
  import os
  from collections import OrderedDict
  from botocore.exceptions import ClientError
  from mock import patch, MagicMock
  from moto import mock_kms, mock_ssm
  from nose.tools import assert_equal, assert_false, assert_is_instance, assert_is_none, assert_is_not_none, assert_not_equal, assert_true
  from streamalert.alert_processor.outputs.output_base import OutputProperty
  from streamalert.alert_processor.outputs.credentials.provider import SSMDriver, LocalFileDriver, Credentials, OutputCredentialsProvider, EphemeralUnencryptedDriver, SpooledTempfileDriver, get_formatted_output_credentials_name
  from tests.unit.streamalert.alert_processor import PREFIX, CONFIG, KMS_ALIAS, REGION, MOCK_ENV
  from tests.unit.streamalert.alert_processor.helpers import encrypt_with_kms, setup_mock_kms
label_desc: Use image node_id 5 for calling the TestLocalFileDriver obj's underlying member method code with example usage: obj.test_save_and_load_credentials_persists_statically() without return types