Example #1
0
    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)
Example #2
0
 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"
         ],
     )
Example #3
0
 def _fake_extractor(file_path):
     return extractors.ExtractedMetadata(summary='test summary',
                                         description='test description')
Example #4
0
 def _fake_extractor(file_path):
     return extractors.ExtractedMetadata(
         desktop_file_ids=['com.example.test-app.desktop'])
Example #5
0
 def _fake_extractor(file_path):
     return extractors.ExtractedMetadata(
         icon='test/extracted/unexistent/icon/path')
Example #6
0
 def _fake_extractor(file_path):
     return extractors.ExtractedMetadata(
         description='extracted description')
Example #7
0
 def _fake_extractor(file_path, workdir):
     return extractors.ExtractedMetadata(**{self.keyword: "extracted-value"})
Example #8
0
 def _fake_extractor(file_path, workdir):
     return extractors.ExtractedMetadata(
         desktop_file_paths=[
             "usr/share/applications/com.example.test/app.desktop"
         ]
     )
Example #9
0
 def _fake_extractor(file_path, workdir):
     return extractors.ExtractedMetadata(
         icon="test/extracted/unexistent/icon/path"
     )
Example #10
0
 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")