Changeset View
Changeset View
Standalone View
Standalone View
swh/indexer/tests/storage/conftest.py
Show All 35 Lines | tools = { | ||||
"version": tool["tool_version"], | "version": tool["tool_version"], | ||||
"configuration": tool["tool_configuration"], | "configuration": tool["tool_configuration"], | ||||
} | } | ||||
for tool in swh_indexer_storage.indexer_configuration_add(TOOLS) | for tool in swh_indexer_storage.indexer_configuration_add(TOOLS) | ||||
} | } | ||||
data.tools = tools | data.tools = tools | ||||
data.sha1_1 = hash_to_bytes("34973274ccef6ab4dfaaf86599792fa9c3fe4689") | data.sha1_1 = hash_to_bytes("34973274ccef6ab4dfaaf86599792fa9c3fe4689") | ||||
data.sha1_2 = hash_to_bytes("61c2b3a30496d329e21af70dd2d7e097046d07b7") | data.sha1_2 = hash_to_bytes("61c2b3a30496d329e21af70dd2d7e097046d07b7") | ||||
data.revision_id_1 = hash_to_bytes("7026b7c1a2af56521e951c01ed20f255fa054238") | data.directory_id_1 = hash_to_bytes("7026b7c1a2af56521e951c01ed20f255fa054238") | ||||
data.revision_id_2 = hash_to_bytes("7026b7c1a2af56521e9587659012345678904321") | data.directory_id_2 = hash_to_bytes("7026b7c1a2af56521e9587659012345678904321") | ||||
data.revision_id_3 = hash_to_bytes("7026b7c1a2af56521e9587659012345678904320") | data.directory_id_3 = hash_to_bytes("7026b7c1a2af56521e9587659012345678904320") | ||||
data.origin_url_1 = "file:///dev/0/zero" # 44434341 | data.origin_url_1 = "file:///dev/0/zero" # 44434341 | ||||
data.origin_url_2 = "file:///dev/1/one" # 44434342 | data.origin_url_2 = "file:///dev/1/one" # 44434342 | ||||
data.origin_url_3 = "file:///dev/2/two" # 54974445 | data.origin_url_3 = "file:///dev/2/two" # 54974445 | ||||
data.mimetypes = [ | data.mimetypes = [ | ||||
ContentMimetypeRow(indexer_configuration_id=tools["file"]["id"], **mimetype_obj) | ContentMimetypeRow(indexer_configuration_id=tools["file"]["id"], **mimetype_obj) | ||||
for mimetype_obj in MIMETYPE_OBJECTS | for mimetype_obj in MIMETYPE_OBJECTS | ||||
] | ] | ||||
swh_indexer_storage.content_mimetype_add(data.mimetypes) | swh_indexer_storage.content_mimetype_add(data.mimetypes) | ||||
Show All 26 Lines |