def test_valid_bundle(): """ test bundle extraction """ module_path = os.path.join(os.getcwd(), MODULE_FILE_PATH) path_to_bundle = os.path.join(os.getcwd(), BUNDLE_ZIP_FILE) metadata = module_metadata.create_default_metadata(module_path) metadata['module_name'] = 'module_name' packer.archive(module_path, metadata) metadata, binary = unpacker.unpack(path_to_bundle) assert metadata is not None assert binary is not None
def set_defaults(module_path): """ Creates a module metadata using default values """ metadata = module_metadata.create_default_metadata(module_path) return metadata