def test_shell_cp5(self, api_mock):
     shell(['cp', 'dir1/dir2/11.txt', 'cmr://cdir/renamed.txt'])
     print(api_mock.mock_calls)
     api_mock.assert_has_calls([
         call().__enter__().upload_file('dir1\\dir2\\11.txt',
                                        '/cdir/renamed.txt')
     ])
 def test_shell_cp2(self, api_mock):
     shell(['cp', 'dir1', 'cmr://tdir1'])
     print(api_mock.mock_calls)
     # no uploaded
     api_mock.assert_has_calls([])
 def test_shell_cp1(self, api_mock):
     shell(['cp', 'upload.log', 'cmr://.gitignore'])
     print(api_mock.mock_calls)
     api_mock.assert_has_calls(
         [call().__enter__().upload_file('.\\upload.log', '/.gitignore')])
 def test_download_file2file(self):
     shell(
         ['cp', 'cmr://RELEASE/jenkins/plugins/ant.jpi', 'plugins/ant.jpi'])
 def test_download_dir2dir(self):
     shell(['cp', 'cmr://RELEASE/jenkins/plugins', 'plugins'])
 def test_ls(self):
     shell(['ls'])