コード例 #1
0
 def test_raise_import_error_when_class_or_attribute_not_found(self):
     with pytest.raises(ImportError):
         import_string('siilo.storages.filesystem.FooBarBaz')
コード例 #2
0
 def test_raise_import_error_when_string_is_not_dotted_path(self):
     with pytest.raises(ImportError):
         import_string('hokus pokus')
コード例 #3
0
    def test_import_class_from_string(self):
        cls = import_string('siilo.storages.filesystem.FileSystemStorage')

        from siilo.storages.filesystem import FileSystemStorage
        assert cls == FileSystemStorage
コード例 #4
0
ファイル: test_storage.py プロジェクト: pricez/flask_siilo
 def test_raise_import_error_when_class_or_attribute_not_found(self):
     with pytest.raises(ImportError):
         import_string('siilo.storages.filesystem.FooBarBaz')
コード例 #5
0
ファイル: test_storage.py プロジェクト: pricez/flask_siilo
 def test_raise_import_error_when_string_is_not_dotted_path(self):
     with pytest.raises(ImportError):
         import_string('hokus pokus')
コード例 #6
0
ファイル: test_storage.py プロジェクト: pricez/flask_siilo
    def test_import_class_from_string(self):
        cls = import_string('siilo.storages.filesystem.FileSystemStorage')

        from siilo.storages.filesystem import FileSystemStorage
        assert cls == FileSystemStorage