Ejemplo n.º 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)),
     }
Ejemplo n.º 2
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)),
     }
Ejemplo n.º 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)),
     }
Ejemplo n.º 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)
         ),
     }
Ejemplo n.º 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())
Ejemplo n.º 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)),
     }