50fd6631f3629179014b97a26d07a62d4985d87f,core/tests/test_connections/test_azure/test_azure_store.py,TestAzureStore,test_upload_dir,#TestAzureStore#Any#,169

Before Change



        // Test with basename
        store.upload_dir(dirname=dirname1, blob=azure_url, use_basename=True)
        client.return_value.create_blob_from_path.assert_has_calls(
            [
                mock.call(
                    "container", "{}{}/test1.txt".format(blob_path, rel_path1), fpath1
                ),
                mock.call(
                    "container", "{}{}/test2.txt".format(blob_path, rel_path1), fpath2
                ),
                mock.call(
                    "container",
                    "{}{}/{}/test3.txt".format(blob_path, rel_path1, rel_path2),
                    fpath3,
                ),
            ],
            any_order=True,
        )

    @mock.patch(AZURE_MODULE.format("BlockBlobService"))
    def test_upload_dir_with_last_time(self, client):
        dirname1 = tempfile.mkdtemp()

After Change



        // Test without basename
        store.upload_dir(dirname=dirname1, blob=azure_url, use_basename=False)
        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 == "{}test1.txt".format(blob_path):
                assert call_arg2.name == fpath1
            elif call_arg1 == "{}test2.txt".format(blob_path):
                assert call_arg2.name == fpath2
            elif 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)
        call_args_list = client.get_container_client().upload_blob.call_args_list[3:]
        for call_args in call_args_list:
            call_arg1, call_arg2 = call_args[0]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 15

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


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_download_dir


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


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_download_dir_with_basename