def __init__(self, property_names, part_properties=None, project=None, plugin_assets=None, machine_assets=None, metadata=None, metadata_files=None): # Save this off before calling super() since we'll need it # FIXME: for 3.x the name `schema_properties` is leaking # implementation details from a higher layer. self.schema_properties = property_names if plugin_assets: self.assets = plugin_assets else: self.assets = {} if machine_assets: self.assets.update(machine_assets) if not metadata: metadata = extractors.ExtractedMetadata() if not metadata_files: metadata_files = [] self.extracted_metadata = { 'metadata': metadata, 'files': metadata_files } super().__init__(part_properties, project)
def _fake_extractor(file_path, workdir): return extractors.ExtractedMetadata( common_id="test_common_id", summary="test summary", description="test description", icon="/test/path", desktop_file_paths=[ "usr/share/applications/com.example.test/app.desktop" ], )
def _fake_extractor(file_path): return extractors.ExtractedMetadata(summary='test summary', description='test description')
def _fake_extractor(file_path): return extractors.ExtractedMetadata( desktop_file_ids=['com.example.test-app.desktop'])
def _fake_extractor(file_path): return extractors.ExtractedMetadata( icon='test/extracted/unexistent/icon/path')
def _fake_extractor(file_path): return extractors.ExtractedMetadata( description='extracted description')
def _fake_extractor(file_path, workdir): return extractors.ExtractedMetadata(**{self.keyword: "extracted-value"})
def _fake_extractor(file_path, workdir): return extractors.ExtractedMetadata( desktop_file_paths=[ "usr/share/applications/com.example.test/app.desktop" ] )
def _fake_extractor(file_path, workdir): return extractors.ExtractedMetadata( icon="test/extracted/unexistent/icon/path" )
def _fake_extractor(file_path, workdir): return extractors.ExtractedMetadata(description="extracted description")
def _fake_extractor(file_path, workdir): return extractors.ExtractedMetadata(summary="test summary", description="test description")