50fd6631f3629179014b97a26d07a62d4985d87f,core/tests/test_connections/test_azure/test_azure_store.py,TestAzureStore,test_upload_dir_with_last_time,#TestAzureStore#Any#,224
Before Change
store.upload_dir(
dirname=dirname1, blob=azure_url, use_basename=True, last_time=last_time
)
client.return_value.create_blob_from_path.assert_has_calls(
[
mock.call(
"container",
"{}{}/{}/test3.txt".format(blob_path, rel_path1, rel_path2),
fpath3,
)
],
any_order=True,
)
@mock.patch(AZURE_MODULE.format("BlockBlobService"))
def test_download_dir(self, client):
dirname1 = tempfile.mkdtemp()
After Change
f.write("data3")
store = AzureBlobStoreService()
store.set_connection(connection=client)
blob_path = "path/to/"
azure_url = self.wasbs_base + blob_path
rel_path1 = dirname1.split("/")[-1]
rel_path2 = dirname2.split("/")[-1]
// Test without basename
store.upload_dir(
dirname=dirname1, blob=azure_url, use_basename=False, last_time=last_time
)
call_args_list = client.get_container_client().upload_blob.call_args_list
for call_args in call_args_list:
call_arg1, call_arg2 = call_args[0]
if call_arg1 == "{}{}/test3.txt".format(blob_path, rel_path2):
assert call_arg2.name == fpath3
else:
assert False
// Test with basename
store.upload_dir(
dirname=dirname1, blob=azure_url, use_basename=True, last_time=last_time
)
call_args_list = client.get_container_client().upload_blob.call_args_list[1:]
for call_args in call_args_list:
call_arg1, call_arg2 = call_args[0]
if call_arg1 == "{}{}/{}/test3.txt".format(blob_path, rel_path1, rel_path2):
assert call_arg2.name == fpath3
else:
assert False
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: polyaxon/polyaxon
Commit Name: 50fd6631f3629179014b97a26d07a62d4985d87f
Time: 2020-05-02
Author: mouradmourafiq@gmail.com
File Name: core/tests/test_connections/test_azure/test_azure_store.py
Class Name: TestAzureStore
Method Name: test_upload_dir_with_last_time
Project Name: polyaxon/polyaxon
Commit Name: 50fd6631f3629179014b97a26d07a62d4985d87f
Time: 2020-05-02
Author: mouradmourafiq@gmail.com
File Name: core/tests/test_connections/test_azure/test_azure_store.py
Class Name: TestAzureStore
Method Name: test_upload_file
Project Name: polyaxon/polyaxon
Commit Name: 50fd6631f3629179014b97a26d07a62d4985d87f
Time: 2020-05-02
Author: mouradmourafiq@gmail.com
File Name: core/tests/test_connections/test_azure/test_azure_store.py
Class Name: TestAzureStore
Method Name: test_upload_dir_with_last_time
Project Name: polyaxon/polyaxon
Commit Name: 50fd6631f3629179014b97a26d07a62d4985d87f
Time: 2020-05-02
Author: mouradmourafiq@gmail.com
File Name: core/tests/test_connections/test_azure/test_azure_store.py
Class Name: TestAzureStore
Method Name: test_upload_dir