def test_azure_setgetstate(): container = str(uuid()) conn_string = create_azure_conn_string(load_azure_credentials()) store = AzureBlockBlobStore(conn_string=conn_string, container=container) store.put(u'key1', b'value1') buf = pickle.dumps(store, protocol=2) store = pickle.loads(buf) assert store.get(u'key1') == b'value1' _delete_container(conn_string, container)
def test_azure_setgetstate(): from azure.storage.blob import BlockBlobService container = uuid() conn_string = create_azure_conn_string(load_azure_credentials()) s = BlockBlobService(connection_string=conn_string) store = AzureBlockBlobStore(conn_string=conn_string, container=container) store.put(u'key1', b'value1') buf = pickle.dumps(store, protocol=2) store = pickle.loads(buf) assert store.get(u'key1') == b'value1' s.delete_container(container)
def test_azure_setgetstate(): from azure.storage.blob import BlockBlobService container = uuid() conn_string = create_azure_conn_string(load_azure_credentials()) s = BlockBlobService(connection_string=conn_string) store = AzureBlockBlobStore(conn_string=conn_string, container=container) store.put(u'key1', b'value1') buf = pickle.dumps(store, protocol=2) store = pickle.loads(buf) assert store.get(u'key1') == b'value1' s.delete_container(container)