Changeset View
Changeset View
Standalone View
Standalone View
swh/objstorage/tests/test_objstorage_azure.py
Show All 24 Lines | def __init__(self, name, content): | ||||
self.name = name | self.name = name | ||||
self.content = content | self.content = content | ||||
class MockBlockBlobService(): | class MockBlockBlobService(): | ||||
"""Mock internal azure library which AzureCloudObjStorage depends upon. | """Mock internal azure library which AzureCloudObjStorage depends upon. | ||||
""" | """ | ||||
_data = {} # type: Dict[str, Any] | _data: Dict[str, Any] = {} | ||||
def __init__(self, account_name, account_key, **kwargs): | def __init__(self, account_name, account_key, **kwargs): | ||||
# do not care for the account_name and the api_secret_key here | # do not care for the account_name and the api_secret_key here | ||||
self._data = defaultdict(dict) | self._data = defaultdict(dict) | ||||
def get_container_properties(self, container_name): | def get_container_properties(self, container_name): | ||||
self._data[container_name] | self._data[container_name] | ||||
return container_name in self._data | return container_name in self._data | ||||
▲ Show 20 Lines • Show All 145 Lines • Show Last 20 Lines |