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)), }
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)), }
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) ), }
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())