def METHOD_NAME(self):
    # Creds should be pulled from the env vars because
    # if access_key/secret_key/profile are all specified on
    # the same "level", then the explicit creds take
    # precedence.
    with temporary_file('w') as f:
        self.environ['AWS_SHARED_CREDENTIALS_FILE'] = f.name
        self.environ['AWS_PROFILE'] = 'myprofile'
        # Even though we don't use the profile for credentials,
        # if you have a profile configured in any way
        # (env vars, set when creating a session, etc.) that profile
        # must exist.  So we need to create an empty profile
        # matching the value from AWS_PROFILE.
        f.write('[myprofile]\n')
        f.flush()
        self.environ['AWS_ACCESS_KEY_ID'] = 'env_var_akid'
        self.environ['AWS_SECRET_ACCESS_KEY'] = 'env_var_sak'
        creds = self.session.get_credentials()
        self.assertEqual(creds.access_key, 'env_var_akid')
        self.assertEqual(creds.secret_key, 'env_var_sak')