Example #1
0
 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')
     ])
Example #2
0
 def test_shell_cp2(self, api_mock):
     shell(['cp', 'dir1', 'cmr://tdir1'])
     print(api_mock.mock_calls)
     # no uploaded
     api_mock.assert_has_calls([])
Example #3
0
 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')])
Example #4
0
 def test_download_file2file(self):
     shell(
         ['cp', 'cmr://RELEASE/jenkins/plugins/ant.jpi', 'plugins/ant.jpi'])
Example #5
0
 def test_download_dir2dir(self):
     shell(['cp', 'cmr://RELEASE/jenkins/plugins', 'plugins'])
Example #6
0
 def test_ls(self):
     shell(['ls'])