def tearDownClass(cls): cls.clear_directory() if not is_integration(): directory_arn = Config.get_directory()._dir_arn schema_arn = get_published_schema_from_directory(directory_arn) cleanup_directory(directory_arn) cleanup_schema(f"{schema_arn}/0") if old_directory_name: os.environ["FUSILLADE_DIR"] = old_directory_name
def tearDownClass(cls): cleanup_directory(cls.directory._dir_arn) cleanup_schema(cls.schema_arn)
""" import os import sys pkg_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) # noqa sys.path.insert(0, pkg_root) # noqa from fusillade.directory import cleanup_directory, cleanup_schema, cd_client if __name__ == "__main__": for response in cd_client.get_paginator('list_directories').paginate( MaxResults=30, state='ENABLED'): for directory in response['Directories']: if 'test_dir' in directory['Name']: cleanup_directory(directory['DirectoryArn']) directories = [ i['Name'] for i in cd_client.list_directories( MaxResults=30, state='ENABLED')['Directories'] ] print('DIRECTORIES:') for i in directories: print('\t', i) for response_0 in cd_client.get_paginator( 'list_published_schema_arns').paginate(MaxResults=30): for schema_0 in response_0['SchemaArns']: if "authz/T" in schema_0: for response_1 in cd_client.get_paginator( 'list_published_schema_arns').paginate(