From 0e8dc783c7785cbca9285bb70ced8594573ac168 Mon Sep 17 00:00:00 2001 From: "alvaro.gonzalez" Date: Tue, 30 Jun 2020 09:12:55 +0300 Subject: [PATCH] Fix test, now a different function is used in the code --- tests/test_filer.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_filer.py b/tests/test_filer.py index 9aebe18..512a80c 100644 --- a/tests/test_filer.py +++ b/tests/test_filer.py @@ -1,6 +1,6 @@ import unittest from tesk_core.filer import newTransput, FTPTransput, HTTPTransput, FileTransput,\ - process_file, logConfig, getPath, copyDir + process_file, logConfig, getPath, copyDir, copyFile from tesk_core.exception import UnknownProtocol, InvalidHostPath,\ FileProtocolDisabled from tesk_core.path import containerPath @@ -94,8 +94,8 @@ def test_upload_dir(self, copyMock, copyDirMock): , '/transfer/tmphrtip1o8') @patch('tesk_core.filer.copyDir') - @patch('tesk_core.filer.shutil.copy') - def test_upload_file(self, copyMock, copyDirMock): + @patch('tesk_core.filer.copyFile') + def test_upload_file(self, copyFileMock, copyDirMock): filedata = { "url": "file:///home/tfga/workspace/cwl-tes/tmphrtip1o8/md5", @@ -108,7 +108,7 @@ def test_upload_file(self, copyMock, copyDirMock): copyDirMock.assert_not_called() - copyMock.assert_called_once_with( '/TclSZU/md5' + copyFileMock.assert_called_once_with( '/TclSZU/md5' , '/transfer/tmphrtip1o8/md5')