Beispiel #1
0
 def topic(self):
     importer = Importer(None)
     importer.import_item(
         config_key='file_storage',
         item_value='thumbor.storages.file_storage',
         class_name='Storage')
     return importer.file_storage
Beispiel #2
0
 def topic(self):
     importer = Importer(None)
     importer.import_item(
         config_key='detectors',
         item_value=('thumbor.detectors.feature_detector',
                     'thumbor.detectors.feature_detector'),
         is_multiple=True)
     return importer.detectors
Beispiel #3
0
 def test_single_item_should_equal_file_storage(self):
     importer = Importer(None)
     importer.import_item(
         config_key='file_storage',
         item_value='thumbor.storages.file_storage',
         class_name='Storage'
     )
     expect(importer.file_storage).to_equal(file_storage)
Beispiel #4
0
 def test_single_item_should_equal_file_storage(self):
     importer = Importer(None)
     importer.import_item(
         config_key='file_storage',
         item_value='thumbor.storages.file_storage',
         class_name='Storage'
     )
     expect(importer.file_storage).to_equal(file_storage)
Beispiel #5
0
 def test_single_item_should_equal_file_storage():
     importer = Importer(None)
     importer.import_item(
         config_key="file_storage",
         item_value="thumbor.storages.file_storage",
         class_name="Storage",
     )
     expect(getattr(importer, "file_storage")).to_equal(file_storage)
Beispiel #6
0
    def test_multiple_items_can_be_imported(self):
        importer = Importer(None)
        importer.import_item(config_key='detectors',
                             is_multiple=True,
                             item_value=('thumbor.detectors.feature_detector',
                                         'thumbor.detectors.feature_detector'))

        expect(importer.detectors).to_length(2)
        expect(importer.detectors).to_include(feature_detector)
Beispiel #7
0
 def topic(self):
     importer = Importer(None)
     importer.import_item(
         config_key='detectors', is_multiple=True,
         item_value=(
             'thumbor.detectors.feature_detector',
             'thumbor.detectors.feature_detector'
         )
     )
     return importer.detectors
Beispiel #8
0
    def test_multiple_items_can_be_imported(self):
        importer = Importer(None)
        importer.import_item(
            config_key='detectors', is_multiple=True,
            item_value=(
                'thumbor.detectors.feature_detector',
                'thumbor.detectors.feature_detector'
            )
        )

        expect(importer.detectors).to_length(2)
        expect(importer.detectors).to_include(feature_detector)
Beispiel #9
0
    def test_multiple_items_can_be_imported():
        importer = Importer(None)
        importer.import_item(
            config_key="detectors",
            is_multiple=True,
            item_value=(
                "thumbor.detectors.feature_detector",
                "thumbor.detectors.feature_detector",
            ),
        )

        expect(importer.detectors).to_length(2)
        expect(importer.detectors).to_include(feature_detector)
Beispiel #10
0
 def topic(self):
     importer = Importer(None)
     importer.import_item(config_key='file_storage', item_value='thumbor.storages.file_storage', class_name='Storage')
     return importer.file_storage