コード例 #1
0
 def build_centos_repos(cls, releases_paths):
     for repo_path in releases_paths:
         repo_packages = join_path(repo_path, 'Packages')
         utils.create_dir(repo_packages)
         utils.move_files_in_dir(join_path(repo_path, '*.rpm'),
                                 repo_packages)
         utils.exec_cmd('createrepo -o {0} {0}'.format(repo_path))
コード例 #2
0
 def build_centos_repos(cls, releases_paths):
     for repo_path in releases_paths:
         repo_packages = join_path(repo_path, 'Packages')
         utils.create_dir(repo_packages)
         utils.move_files_in_dir(
             join_path(repo_path, '*.rpm'),
             repo_packages)
         utils.exec_cmd('createrepo -o {0} {0}'.format(repo_path))
コード例 #3
0
 def test_move_files_in_dir(self, glob_mock, move_mock):
     mask = 'file*'
     dst_dir = '/tmp'
     utils.move_files_in_dir(mask, dst_dir)
     glob_mock.assert_called_once_with(mask)
     self.assertEqual(move_mock.call_args_list, [
         mock.call('file1', '/tmp/file1'),
         mock.call('file2', '/tmp/file2')
     ])
コード例 #4
0
ファイル: test_utils.py プロジェクト: sxpx/fuel-plugins
 def test_move_files_in_dir(self, glob_mock, move_mock):
     mask = 'file*'
     dst_dir = '/tmp'
     utils.move_files_in_dir(mask, dst_dir)
     glob_mock.assert_called_once_with(mask)
     self.assertEqual(
         move_mock.call_args_list,
         [mock.call('file1', '/tmp/file1'),
          mock.call('file2', '/tmp/file2')])