Changeset View
Changeset View
Standalone View
Standalone View
swh/web/tests/data.py
Show First 20 Lines • Show All 276 Lines • ▼ Show 20 Lines | for content in result: | ||||
"hljs_language": content_display_data["language"], | "hljs_language": content_display_data["language"], | ||||
"data": content_display_data["content_data"], | "data": content_display_data["content_data"], | ||||
} | } | ||||
) | ) | ||||
_contents[sha1] = content_metadata | _contents[sha1] = content_metadata | ||||
contents.append(content_metadata) | contents.append(content_metadata) | ||||
# Create indexer storage instance that will be shared by indexers | # Create indexer storage instance that will be shared by indexers | ||||
idx_storage = get_indexer_storage("memory", {}) | idx_storage = get_indexer_storage("memory") | ||||
# Add the empty directory to the test archive | # Add the empty directory to the test archive | ||||
storage.directory_add([Directory(entries=())]) | storage.directory_add([Directory(entries=())]) | ||||
# Add empty content to the test archive | # Add empty content to the test archive | ||||
storage.content_add([Content.from_data(data=b"")]) | storage.content_add([Content.from_data(data=b"")]) | ||||
# Return tests data | # Return tests data | ||||
▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines |