[live-media] Support release set to None globally

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2016-03-09 13:08:22 +01:00
parent 4bc126979b
commit 7e2cd28fb8
2 changed files with 21 additions and 1 deletions

View File

@ -35,7 +35,7 @@ class LiveMediaPhase(PhaseBase):
},
{
"name": "live_media_release",
"expected_types": [str],
"expected_types": [str, type(None)],
"optional": True,
}
)

View File

@ -14,6 +14,26 @@ from tests.helpers import DummyCompose, PungiTestCase
class TestLiveMediaPhase(PungiTestCase):
def test_global_config_validation(self):
compose = DummyCompose(self.topdir, {
'live_media_ksurl': 'git://example.com/repo.git#HEAD',
'live_media_target': 'f24',
'live_media_release': 'RRR',
'live_media_version': 'Rawhide',
})
phase = LiveMediaPhase(compose)
phase.validate()
def test_global_config_null_release(self):
compose = DummyCompose(self.topdir, {
'live_media_release': None,
})
phase = LiveMediaPhase(compose)
phase.validate()
@mock.patch('pungi.phases.livemedia_phase.ThreadPool')
def test_live_media_minimal(self, ThreadPool):
compose = DummyCompose(self.topdir, {