示例#1
0
 def configure(cls, settings):
     """ Configure the cache method with app settings """
     return {
         'storage': get_storage_impl(settings),
         'allow_overwrite': asbool(settings.get('pypi.allow_overwrite',
                                                False)),
     }
示例#2
0
文件: base.py 项目: zarlant/pypicloud
 def configure(cls, settings):
     """ Configure the cache method with app settings """
     return {
         "storage": get_storage_impl(settings),
         "allow_overwrite":
         asbool(settings.get("pypi.allow_overwrite", False)),
     }
示例#3
0
 def configure(cls, settings):
     """ Configure the cache method with app settings """
     return {
         'storage': get_storage_impl(settings),
         'allow_overwrite':
         asbool(settings.get('pypi.allow_overwrite', False)),
     }
示例#4
0
 def configure(cls, settings):
     """ Configure the cache method with app settings """
     return {
         "storage": get_storage_impl(settings),
         "allow_overwrite": asbool(settings.get("pypi.allow_overwrite", False)),
         "allow_delete": asbool(settings.get("pypi.allow_delete", True)),
         "calculate_hashes": asbool(
             settings.get("pypi.calculate_package_hashes", True)
         ),
     }
示例#5
0
 def setUp(self):
     super(TestAzureStorage, self).setUp()
     self.settings = {
         "pypi.storage": "azure-blob",
         "storage.storage_account_name": "terrytest2",
         "storage.storage_account_key":
         "Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa==",
         "storage.storage_container_name": "pypi",
     }
     storage_func = get_storage_impl(self.settings)
     self.storage = storage_func(MagicMock())
示例#6
0
 def configure(cls, settings):
     """ Configure the cache method with app settings """
     return {
         "storage": get_storage_impl(settings),
         "allow_overwrite": asbool(settings.get("pypi.allow_overwrite", False)),
     }