def test_get_flatpak_channel_prod(raises, scopes, channel): task = {"scopes": scopes, "payload": {"channel": channel}} config = {"push_to_flathub": True} if raises: with pytest.raises(TaskVerificationError): get_flatpak_channel(config, task) else: assert get_flatpak_channel(config, task) == channel
async def async_main(context): context.task = client.get_task(context.config) channel = task.get_flatpak_channel(context.config, context.task) flatpak_file_path = artifacts.get_flatpak_file_path(context) _log_warning_forewords(context.config, channel) flathub.push(context, flatpak_file_path, channel)
def test_get_flatpak_channel_without_payload_raises(): task = {"payload": {}} config = {} with pytest.raises(TaskVerificationError): get_flatpak_channel(config, task)