[tests] Dummy compose is no longer private
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
		
							parent
							
								
									385b52041c
								
							
						
					
					
						commit
						e9292fc942
					
				| @ -17,7 +17,7 @@ class PungiTestCase(unittest.TestCase): | |||||||
|         shutil.rmtree(self.topdir) |         shutil.rmtree(self.topdir) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class _DummyCompose(object): | class DummyCompose(object): | ||||||
|     def __init__(self, topdir, config): |     def __init__(self, topdir, config): | ||||||
|         self.supported = True |         self.supported = True | ||||||
|         self.compose_date = '20151203' |         self.compose_date = '20151203' | ||||||
|  | |||||||
| @ -11,10 +11,10 @@ import sys | |||||||
| sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) | sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) | ||||||
| 
 | 
 | ||||||
| from pungi.phases.buildinstall import BuildinstallPhase, BuildinstallThread | from pungi.phases.buildinstall import BuildinstallPhase, BuildinstallThread | ||||||
| from tests.helpers import _DummyCompose, PungiTestCase | from tests.helpers import DummyCompose, PungiTestCase | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class BuildInstallCompose(_DummyCompose): | class BuildInstallCompose(DummyCompose): | ||||||
|     def __init__(self, *args, **kwargs): |     def __init__(self, *args, **kwargs): | ||||||
|         super(BuildInstallCompose, self).__init__(*args, **kwargs) |         super(BuildInstallCompose, self).__init__(*args, **kwargs) | ||||||
|         self.variants = { |         self.variants = { | ||||||
|  | |||||||
| @ -11,14 +11,14 @@ import sys | |||||||
| sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) | sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) | ||||||
| 
 | 
 | ||||||
| from pungi.phases.image_build import ImageBuildPhase, CreateImageBuildThread | from pungi.phases.image_build import ImageBuildPhase, CreateImageBuildThread | ||||||
| from tests.helpers import _DummyCompose, PungiTestCase | from tests.helpers import DummyCompose, PungiTestCase | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class TestImageBuildPhase(PungiTestCase): | class TestImageBuildPhase(PungiTestCase): | ||||||
| 
 | 
 | ||||||
|     @mock.patch('pungi.phases.image_build.ThreadPool') |     @mock.patch('pungi.phases.image_build.ThreadPool') | ||||||
|     def test_image_build(self, ThreadPool): |     def test_image_build(self, ThreadPool): | ||||||
|         compose = _DummyCompose(self.topdir, { |         compose = DummyCompose(self.topdir, { | ||||||
|             'image_build': { |             'image_build': { | ||||||
|                 '^Client|Server$': [ |                 '^Client|Server$': [ | ||||||
|                     { |                     { | ||||||
| @ -100,7 +100,7 @@ class TestImageBuildPhase(PungiTestCase): | |||||||
| 
 | 
 | ||||||
|     @mock.patch('pungi.phases.image_build.ThreadPool') |     @mock.patch('pungi.phases.image_build.ThreadPool') | ||||||
|     def test_image_build_filter_all_variants(self, ThreadPool): |     def test_image_build_filter_all_variants(self, ThreadPool): | ||||||
|         compose = _DummyCompose(self.topdir, { |         compose = DummyCompose(self.topdir, { | ||||||
|             'image_build': { |             'image_build': { | ||||||
|                 '^Client|Server$': [ |                 '^Client|Server$': [ | ||||||
|                     { |                     { | ||||||
| @ -131,7 +131,7 @@ class TestImageBuildPhase(PungiTestCase): | |||||||
| 
 | 
 | ||||||
|     @mock.patch('pungi.phases.image_build.ThreadPool') |     @mock.patch('pungi.phases.image_build.ThreadPool') | ||||||
|     def test_image_build_set_install_tree(self, ThreadPool): |     def test_image_build_set_install_tree(self, ThreadPool): | ||||||
|         compose = _DummyCompose(self.topdir, { |         compose = DummyCompose(self.topdir, { | ||||||
|             'image_build': { |             'image_build': { | ||||||
|                 '^Server$': [ |                 '^Server$': [ | ||||||
|                     { |                     { | ||||||
| @ -191,7 +191,7 @@ class TestImageBuildPhase(PungiTestCase): | |||||||
| 
 | 
 | ||||||
|     @mock.patch('pungi.phases.image_build.ThreadPool') |     @mock.patch('pungi.phases.image_build.ThreadPool') | ||||||
|     def test_image_build_set_extra_repos(self, ThreadPool): |     def test_image_build_set_extra_repos(self, ThreadPool): | ||||||
|         compose = _DummyCompose(self.topdir, { |         compose = DummyCompose(self.topdir, { | ||||||
|             'image_build': { |             'image_build': { | ||||||
|                 '^Server$': [ |                 '^Server$': [ | ||||||
|                     { |                     { | ||||||
| @ -252,7 +252,7 @@ class TestImageBuildPhase(PungiTestCase): | |||||||
| 
 | 
 | ||||||
|     @mock.patch('pungi.phases.image_build.ThreadPool') |     @mock.patch('pungi.phases.image_build.ThreadPool') | ||||||
|     def test_image_build_create_release(self, ThreadPool): |     def test_image_build_create_release(self, ThreadPool): | ||||||
|         compose = _DummyCompose(self.topdir, { |         compose = DummyCompose(self.topdir, { | ||||||
|             'image_build': { |             'image_build': { | ||||||
|                 '^Server$': [ |                 '^Server$': [ | ||||||
|                     { |                     { | ||||||
| @ -288,7 +288,7 @@ class TestImageBuildPhase(PungiTestCase): | |||||||
| 
 | 
 | ||||||
|     @mock.patch('pungi.phases.image_build.ThreadPool') |     @mock.patch('pungi.phases.image_build.ThreadPool') | ||||||
|     def test_image_build_scratch_build(self, ThreadPool): |     def test_image_build_scratch_build(self, ThreadPool): | ||||||
|         compose = _DummyCompose(self.topdir, { |         compose = DummyCompose(self.topdir, { | ||||||
|             'image_build': { |             'image_build': { | ||||||
|                 '^Server$': [ |                 '^Server$': [ | ||||||
|                     { |                     { | ||||||
| @ -329,7 +329,7 @@ class TestCreateImageBuildThread(PungiTestCase): | |||||||
|     @mock.patch('pungi.phases.image_build.KojiWrapper') |     @mock.patch('pungi.phases.image_build.KojiWrapper') | ||||||
|     @mock.patch('pungi.phases.image_build.Linker') |     @mock.patch('pungi.phases.image_build.Linker') | ||||||
|     def test_process(self, Linker, KojiWrapper, get_file_size, get_mtime): |     def test_process(self, Linker, KojiWrapper, get_file_size, get_mtime): | ||||||
|         compose = _DummyCompose(self.topdir, { |         compose = DummyCompose(self.topdir, { | ||||||
|             'koji_profile': 'koji' |             'koji_profile': 'koji' | ||||||
|         }) |         }) | ||||||
|         pool = mock.Mock() |         pool = mock.Mock() | ||||||
| @ -441,7 +441,7 @@ class TestCreateImageBuildThread(PungiTestCase): | |||||||
|     @mock.patch('pungi.phases.image_build.KojiWrapper') |     @mock.patch('pungi.phases.image_build.KojiWrapper') | ||||||
|     @mock.patch('pungi.phases.image_build.Linker') |     @mock.patch('pungi.phases.image_build.Linker') | ||||||
|     def test_process_handle_fail(self, Linker, KojiWrapper): |     def test_process_handle_fail(self, Linker, KojiWrapper): | ||||||
|         compose = _DummyCompose(self.topdir, { |         compose = DummyCompose(self.topdir, { | ||||||
|             'koji_profile': 'koji', |             'koji_profile': 'koji', | ||||||
|             'failable_deliverables': [ |             'failable_deliverables': [ | ||||||
|                 ('^.*$', { |                 ('^.*$', { | ||||||
| @ -492,7 +492,7 @@ class TestCreateImageBuildThread(PungiTestCase): | |||||||
|     @mock.patch('pungi.phases.image_build.KojiWrapper') |     @mock.patch('pungi.phases.image_build.KojiWrapper') | ||||||
|     @mock.patch('pungi.phases.image_build.Linker') |     @mock.patch('pungi.phases.image_build.Linker') | ||||||
|     def test_process_handle_exception(self, Linker, KojiWrapper): |     def test_process_handle_exception(self, Linker, KojiWrapper): | ||||||
|         compose = _DummyCompose(self.topdir, { |         compose = DummyCompose(self.topdir, { | ||||||
|             'koji_profile': 'koji', |             'koji_profile': 'koji', | ||||||
|             'failable_deliverables': [ |             'failable_deliverables': [ | ||||||
|                 ('^.*$', { |                 ('^.*$', { | ||||||
|  | |||||||
| @ -13,13 +13,13 @@ import shutil | |||||||
| sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) | sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) | ||||||
| 
 | 
 | ||||||
| from pungi.phases.image_checksum import ImageChecksumPhase, dump_checksums | from pungi.phases.image_checksum import ImageChecksumPhase, dump_checksums | ||||||
| from tests.helpers import _DummyCompose, PungiTestCase | from tests.helpers import DummyCompose, PungiTestCase | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class TestImageChecksumPhase(PungiTestCase): | class TestImageChecksumPhase(PungiTestCase): | ||||||
| 
 | 
 | ||||||
|     def test_config_skip_individual_with_multiple_algorithms(self): |     def test_config_skip_individual_with_multiple_algorithms(self): | ||||||
|         compose = _DummyCompose(self.topdir, { |         compose = DummyCompose(self.topdir, { | ||||||
|             'media_checksums': ['md5', 'sha1'], |             'media_checksums': ['md5', 'sha1'], | ||||||
|             'media_checksum_one_file': True |             'media_checksum_one_file': True | ||||||
|         }) |         }) | ||||||
| @ -32,7 +32,7 @@ class TestImageChecksumPhase(PungiTestCase): | |||||||
|     @mock.patch('kobo.shortcuts.compute_file_checksums') |     @mock.patch('kobo.shortcuts.compute_file_checksums') | ||||||
|     @mock.patch('pungi.phases.image_checksum.dump_checksums') |     @mock.patch('pungi.phases.image_checksum.dump_checksums') | ||||||
|     def test_checksum_one_file(self, dump, cc, exists): |     def test_checksum_one_file(self, dump, cc, exists): | ||||||
|         compose = _DummyCompose(self.topdir, { |         compose = DummyCompose(self.topdir, { | ||||||
|             'media_checksums': ['sha256'], |             'media_checksums': ['sha256'], | ||||||
|             'media_checksum_one_file': True, |             'media_checksum_one_file': True, | ||||||
|         }) |         }) | ||||||
| @ -52,7 +52,7 @@ class TestImageChecksumPhase(PungiTestCase): | |||||||
|     @mock.patch('kobo.shortcuts.compute_file_checksums') |     @mock.patch('kobo.shortcuts.compute_file_checksums') | ||||||
|     @mock.patch('pungi.phases.image_checksum.dump_checksums') |     @mock.patch('pungi.phases.image_checksum.dump_checksums') | ||||||
|     def test_checksum_save_individuals(self, dump, cc, exists): |     def test_checksum_save_individuals(self, dump, cc, exists): | ||||||
|         compose = _DummyCompose(self.topdir, { |         compose = DummyCompose(self.topdir, { | ||||||
|             'media_checksums': ['md5', 'sha256'], |             'media_checksums': ['md5', 'sha256'], | ||||||
|         }) |         }) | ||||||
| 
 | 
 | ||||||
| @ -83,7 +83,7 @@ class TestImageChecksumPhase(PungiTestCase): | |||||||
|     @mock.patch('kobo.shortcuts.compute_file_checksums') |     @mock.patch('kobo.shortcuts.compute_file_checksums') | ||||||
|     @mock.patch('pungi.phases.image_checksum.dump_checksums') |     @mock.patch('pungi.phases.image_checksum.dump_checksums') | ||||||
|     def test_checksum_one_file_custom_name(self, dump, cc, exists): |     def test_checksum_one_file_custom_name(self, dump, cc, exists): | ||||||
|         compose = _DummyCompose(self.topdir, { |         compose = DummyCompose(self.topdir, { | ||||||
|             'media_checksums': ['sha256'], |             'media_checksums': ['sha256'], | ||||||
|             'media_checksum_one_file': True, |             'media_checksum_one_file': True, | ||||||
|             'media_checksum_base_filename': '%(release_short)s-%(variant)s-%(version)s-%(date)s%(type_suffix)s.%(respin)s' |             'media_checksum_base_filename': '%(release_short)s-%(variant)s-%(version)s-%(date)s%(type_suffix)s.%(respin)s' | ||||||
| @ -106,7 +106,7 @@ class TestImageChecksumPhase(PungiTestCase): | |||||||
|     @mock.patch('kobo.shortcuts.compute_file_checksums') |     @mock.patch('kobo.shortcuts.compute_file_checksums') | ||||||
|     @mock.patch('pungi.phases.image_checksum.dump_checksums') |     @mock.patch('pungi.phases.image_checksum.dump_checksums') | ||||||
|     def test_checksum_save_individuals_custom_name(self, dump, cc, exists): |     def test_checksum_save_individuals_custom_name(self, dump, cc, exists): | ||||||
|         compose = _DummyCompose(self.topdir, { |         compose = DummyCompose(self.topdir, { | ||||||
|             'media_checksums': ['md5', 'sha256'], |             'media_checksums': ['md5', 'sha256'], | ||||||
|             'media_checksum_base_filename': '%(release_short)s-%(variant)s-%(version)s-%(date)s%(type_suffix)s.%(respin)s' |             'media_checksum_base_filename': '%(release_short)s-%(variant)s-%(version)s-%(date)s%(type_suffix)s.%(respin)s' | ||||||
|         }) |         }) | ||||||
|  | |||||||
| @ -11,14 +11,14 @@ import sys | |||||||
| sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) | sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) | ||||||
| 
 | 
 | ||||||
| from pungi.phases.live_images import LiveImagesPhase, CreateLiveImageThread | from pungi.phases.live_images import LiveImagesPhase, CreateLiveImageThread | ||||||
| from tests.helpers import _DummyCompose, PungiTestCase | from tests.helpers import DummyCompose, PungiTestCase | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class TestLiveImagesPhase(PungiTestCase): | class TestLiveImagesPhase(PungiTestCase): | ||||||
| 
 | 
 | ||||||
|     @mock.patch('pungi.phases.live_images.ThreadPool') |     @mock.patch('pungi.phases.live_images.ThreadPool') | ||||||
|     def test_live_image_build(self, ThreadPool): |     def test_live_image_build(self, ThreadPool): | ||||||
|         compose = _DummyCompose(self.topdir, { |         compose = DummyCompose(self.topdir, { | ||||||
|             'live_images': [ |             'live_images': [ | ||||||
|                 ('^Client$', { |                 ('^Client$', { | ||||||
|                     'amd64': { |                     'amd64': { | ||||||
| @ -61,7 +61,7 @@ class TestLiveImagesPhase(PungiTestCase): | |||||||
| 
 | 
 | ||||||
|     @mock.patch('pungi.phases.live_images.ThreadPool') |     @mock.patch('pungi.phases.live_images.ThreadPool') | ||||||
|     def test_live_image_build_without_rename(self, ThreadPool): |     def test_live_image_build_without_rename(self, ThreadPool): | ||||||
|         compose = _DummyCompose(self.topdir, { |         compose = DummyCompose(self.topdir, { | ||||||
|             'live_images_no_rename': True, |             'live_images_no_rename': True, | ||||||
|             'live_images': [ |             'live_images': [ | ||||||
|                 ('^Client$', { |                 ('^Client$', { | ||||||
| @ -105,7 +105,7 @@ class TestLiveImagesPhase(PungiTestCase): | |||||||
| 
 | 
 | ||||||
|     @mock.patch('pungi.phases.live_images.ThreadPool') |     @mock.patch('pungi.phases.live_images.ThreadPool') | ||||||
|     def test_live_image_build_two_images(self, ThreadPool): |     def test_live_image_build_two_images(self, ThreadPool): | ||||||
|         compose = _DummyCompose(self.topdir, { |         compose = DummyCompose(self.topdir, { | ||||||
|             'live_images': [ |             'live_images': [ | ||||||
|                 ('^Client$', { |                 ('^Client$', { | ||||||
|                     'amd64': [{ |                     'amd64': [{ | ||||||
| @ -171,7 +171,7 @@ class TestLiveImagesPhase(PungiTestCase): | |||||||
|     @mock.patch('pungi.phases.live_images.ThreadPool') |     @mock.patch('pungi.phases.live_images.ThreadPool') | ||||||
|     @mock.patch('pungi.phases.live_images.resolve_git_url') |     @mock.patch('pungi.phases.live_images.resolve_git_url') | ||||||
|     def test_spin_appliance(self, resolve_git_url, ThreadPool): |     def test_spin_appliance(self, resolve_git_url, ThreadPool): | ||||||
|         compose = _DummyCompose(self.topdir, { |         compose = DummyCompose(self.topdir, { | ||||||
|             'live_images': [ |             'live_images': [ | ||||||
|                 ('^Client$', { |                 ('^Client$', { | ||||||
|                     'amd64': { |                     'amd64': { | ||||||
| @ -225,7 +225,7 @@ class TestCreateLiveImageThread(PungiTestCase): | |||||||
|     @mock.patch('pungi.phases.live_images.run') |     @mock.patch('pungi.phases.live_images.run') | ||||||
|     @mock.patch('pungi.phases.live_images.KojiWrapper') |     @mock.patch('pungi.phases.live_images.KojiWrapper') | ||||||
|     def test_process(self, KojiWrapper, run, copy2, Image): |     def test_process(self, KojiWrapper, run, copy2, Image): | ||||||
|         compose = _DummyCompose(self.topdir, {'koji_profile': 'koji'}) |         compose = DummyCompose(self.topdir, {'koji_profile': 'koji'}) | ||||||
|         pool = mock.Mock() |         pool = mock.Mock() | ||||||
|         cmd = { |         cmd = { | ||||||
|             'ks_file': '/path/to/ks_file', |             'ks_file': '/path/to/ks_file', | ||||||
| @ -303,7 +303,7 @@ class TestCreateLiveImageThread(PungiTestCase): | |||||||
|     @mock.patch('pungi.phases.live_images.run') |     @mock.patch('pungi.phases.live_images.run') | ||||||
|     @mock.patch('pungi.phases.live_images.KojiWrapper') |     @mock.patch('pungi.phases.live_images.KojiWrapper') | ||||||
|     def test_process_no_rename(self, KojiWrapper, run, copy2, Image): |     def test_process_no_rename(self, KojiWrapper, run, copy2, Image): | ||||||
|         compose = _DummyCompose(self.topdir, {'koji_profile': 'koji'}) |         compose = DummyCompose(self.topdir, {'koji_profile': 'koji'}) | ||||||
|         pool = mock.Mock() |         pool = mock.Mock() | ||||||
|         cmd = { |         cmd = { | ||||||
|             'ks_file': '/path/to/ks_file', |             'ks_file': '/path/to/ks_file', | ||||||
| @ -382,7 +382,7 @@ class TestCreateLiveImageThread(PungiTestCase): | |||||||
|     @mock.patch('pungi.phases.live_images.run') |     @mock.patch('pungi.phases.live_images.run') | ||||||
|     @mock.patch('pungi.phases.live_images.KojiWrapper') |     @mock.patch('pungi.phases.live_images.KojiWrapper') | ||||||
|     def test_process_applicance(self, KojiWrapper, run, copy2, Image): |     def test_process_applicance(self, KojiWrapper, run, copy2, Image): | ||||||
|         compose = _DummyCompose(self.topdir, {'koji_profile': 'koji'}) |         compose = DummyCompose(self.topdir, {'koji_profile': 'koji'}) | ||||||
|         pool = mock.Mock() |         pool = mock.Mock() | ||||||
|         cmd = { |         cmd = { | ||||||
|             'ks_file': '/path/to/ks_file', |             'ks_file': '/path/to/ks_file', | ||||||
| @ -460,7 +460,7 @@ class TestCreateLiveImageThread(PungiTestCase): | |||||||
|     @mock.patch('pungi.phases.live_images.run') |     @mock.patch('pungi.phases.live_images.run') | ||||||
|     @mock.patch('pungi.phases.live_images.KojiWrapper') |     @mock.patch('pungi.phases.live_images.KojiWrapper') | ||||||
|     def test_process_handles_fail(self, KojiWrapper, run, copy2): |     def test_process_handles_fail(self, KojiWrapper, run, copy2): | ||||||
|         compose = _DummyCompose(self.topdir, { |         compose = DummyCompose(self.topdir, { | ||||||
|             'koji_profile': 'koji', |             'koji_profile': 'koji', | ||||||
|             'failable_deliverables': [('^.+$', {'*': ['live']})], |             'failable_deliverables': [('^.+$', {'*': ['live']})], | ||||||
|         }) |         }) | ||||||
| @ -497,7 +497,7 @@ class TestCreateLiveImageThread(PungiTestCase): | |||||||
|     @mock.patch('pungi.phases.live_images.run') |     @mock.patch('pungi.phases.live_images.run') | ||||||
|     @mock.patch('pungi.phases.live_images.KojiWrapper') |     @mock.patch('pungi.phases.live_images.KojiWrapper') | ||||||
|     def test_process_handles_exception(self, KojiWrapper, run, copy2): |     def test_process_handles_exception(self, KojiWrapper, run, copy2): | ||||||
|         compose = _DummyCompose(self.topdir, { |         compose = DummyCompose(self.topdir, { | ||||||
|             'koji_profile': 'koji', |             'koji_profile': 'koji', | ||||||
|             'failable_deliverables': [('^.+$', {'*': ['live']})], |             'failable_deliverables': [('^.+$', {'*': ['live']})], | ||||||
|         }) |         }) | ||||||
|  | |||||||
| @ -10,13 +10,13 @@ import os | |||||||
| sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) | sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) | ||||||
| 
 | 
 | ||||||
| from pungi.phases.livemedia_phase import LiveMediaPhase, LiveMediaThread | from pungi.phases.livemedia_phase import LiveMediaPhase, LiveMediaThread | ||||||
| from tests.helpers import _DummyCompose, PungiTestCase | from tests.helpers import DummyCompose, PungiTestCase | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| class TestLiveMediaPhase(PungiTestCase): | class TestLiveMediaPhase(PungiTestCase): | ||||||
|     @mock.patch('pungi.phases.livemedia_phase.ThreadPool') |     @mock.patch('pungi.phases.livemedia_phase.ThreadPool') | ||||||
|     def test_live_media_minimal(self, ThreadPool): |     def test_live_media_minimal(self, ThreadPool): | ||||||
|         compose = _DummyCompose(self.topdir, { |         compose = DummyCompose(self.topdir, { | ||||||
|             'live_media': { |             'live_media': { | ||||||
|                 '^Server$': [ |                 '^Server$': [ | ||||||
|                     { |                     { | ||||||
| @ -56,7 +56,7 @@ class TestLiveMediaPhase(PungiTestCase): | |||||||
| 
 | 
 | ||||||
|     @mock.patch('pungi.phases.livemedia_phase.ThreadPool') |     @mock.patch('pungi.phases.livemedia_phase.ThreadPool') | ||||||
|     def test_live_media_non_existing_install_tree(self, ThreadPool): |     def test_live_media_non_existing_install_tree(self, ThreadPool): | ||||||
|         compose = _DummyCompose(self.topdir, { |         compose = DummyCompose(self.topdir, { | ||||||
|             'live_media': { |             'live_media': { | ||||||
|                 '^Server$': [ |                 '^Server$': [ | ||||||
|                     { |                     { | ||||||
| @ -79,7 +79,7 @@ class TestLiveMediaPhase(PungiTestCase): | |||||||
| 
 | 
 | ||||||
|     @mock.patch('pungi.phases.livemedia_phase.ThreadPool') |     @mock.patch('pungi.phases.livemedia_phase.ThreadPool') | ||||||
|     def test_live_media_non_existing_repo(self, ThreadPool): |     def test_live_media_non_existing_repo(self, ThreadPool): | ||||||
|         compose = _DummyCompose(self.topdir, { |         compose = DummyCompose(self.topdir, { | ||||||
|             'live_media': { |             'live_media': { | ||||||
|                 '^Server$': [ |                 '^Server$': [ | ||||||
|                     { |                     { | ||||||
| @ -103,7 +103,7 @@ class TestLiveMediaPhase(PungiTestCase): | |||||||
|     @mock.patch('pungi.phases.livemedia_phase.resolve_git_url') |     @mock.patch('pungi.phases.livemedia_phase.resolve_git_url') | ||||||
|     @mock.patch('pungi.phases.livemedia_phase.ThreadPool') |     @mock.patch('pungi.phases.livemedia_phase.ThreadPool') | ||||||
|     def test_live_media_full(self, ThreadPool, resolve_git_url): |     def test_live_media_full(self, ThreadPool, resolve_git_url): | ||||||
|         compose = _DummyCompose(self.topdir, { |         compose = DummyCompose(self.topdir, { | ||||||
|             'live_media': { |             'live_media': { | ||||||
|                 '^Server$': [ |                 '^Server$': [ | ||||||
|                     { |                     { | ||||||
| @ -161,7 +161,7 @@ class TestCreateImageBuildThread(PungiTestCase): | |||||||
|     @mock.patch('pungi.phases.livemedia_phase.KojiWrapper') |     @mock.patch('pungi.phases.livemedia_phase.KojiWrapper') | ||||||
|     @mock.patch('pungi.phases.livemedia_phase.Linker') |     @mock.patch('pungi.phases.livemedia_phase.Linker') | ||||||
|     def test_process(self, Linker, KojiWrapper, get_file_size, get_mtime): |     def test_process(self, Linker, KojiWrapper, get_file_size, get_mtime): | ||||||
|         compose = _DummyCompose(self.topdir, { |         compose = DummyCompose(self.topdir, { | ||||||
|             'koji_profile': 'koji' |             'koji_profile': 'koji' | ||||||
|         }) |         }) | ||||||
|         config = { |         config = { | ||||||
| @ -258,7 +258,7 @@ class TestCreateImageBuildThread(PungiTestCase): | |||||||
| 
 | 
 | ||||||
|     @mock.patch('pungi.phases.livemedia_phase.KojiWrapper') |     @mock.patch('pungi.phases.livemedia_phase.KojiWrapper') | ||||||
|     def test_handle_koji_fail(self, KojiWrapper): |     def test_handle_koji_fail(self, KojiWrapper): | ||||||
|         compose = _DummyCompose(self.topdir, { |         compose = DummyCompose(self.topdir, { | ||||||
|             'koji_profile': 'koji', |             'koji_profile': 'koji', | ||||||
|             'failable_deliverables': [ |             'failable_deliverables': [ | ||||||
|                 ('^.+$', {'*': ['live-media']}) |                 ('^.+$', {'*': ['live-media']}) | ||||||
| @ -297,7 +297,7 @@ class TestCreateImageBuildThread(PungiTestCase): | |||||||
| 
 | 
 | ||||||
|     @mock.patch('pungi.phases.livemedia_phase.KojiWrapper') |     @mock.patch('pungi.phases.livemedia_phase.KojiWrapper') | ||||||
|     def test_handle_exception(self, KojiWrapper): |     def test_handle_exception(self, KojiWrapper): | ||||||
|         compose = _DummyCompose(self.topdir, { |         compose = DummyCompose(self.topdir, { | ||||||
|             'koji_profile': 'koji', |             'koji_profile': 'koji', | ||||||
|             'failable_deliverables': [ |             'failable_deliverables': [ | ||||||
|                 ('^.+$', {'*': ['live-media']}) |                 ('^.+$', {'*': ['live-media']}) | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user