Changeset View
Changeset View
Standalone View
Standalone View
swh/indexer/tests/tasks.py
from celery import current_app as app | from celery import current_app as app | ||||
from swh.indexer.metadata import ( | from swh.indexer.metadata import ( | ||||
OriginMetadataIndexer, RevisionMetadataIndexer | OriginMetadataIndexer, RevisionMetadataIndexer | ||||
) | ) | ||||
from .test_origin_head import OriginHeadTestIndexer | from .test_origin_head import OriginHeadTestIndexer | ||||
from .test_metadata import ContentMetadataTestIndexer | |||||
from .utils import BASE_TEST_CONFIG | from .utils import BASE_TEST_CONFIG | ||||
class RevisionMetadataTestIndexer(RevisionMetadataIndexer): | class RevisionMetadataTestIndexer(RevisionMetadataIndexer): | ||||
"""Specific indexer whose configuration is enough to satisfy the | """Specific indexer whose configuration is enough to satisfy the | ||||
indexing tests. | indexing tests. | ||||
""" | """ | ||||
ContentMetadataIndexer = ContentMetadataTestIndexer | |||||
def parse_config_file(self, *args, **kwargs): | def parse_config_file(self, *args, **kwargs): | ||||
return { | return { | ||||
**BASE_TEST_CONFIG, | **BASE_TEST_CONFIG, | ||||
'tools': { | 'tools': { | ||||
'name': 'swh-metadata-detector', | 'name': 'swh-metadata-detector', | ||||
'version': '0.0.2', | 'version': '0.0.2', | ||||
'configuration': { | 'configuration': { | ||||
'type': 'local', | 'type': 'local', | ||||
Show All 29 Lines |