def test_yml_comment_dict():
from jenkins_epo.bot import Instruction
from jenkins_epo.extensions.core import YamlExtension
ext = YamlExtension('ext', Mock())
ext.current = ext.bot.current
ext.current.yaml = {}
ext.process_instruction(Instruction(
author='a', name='yaml', args=dict(job=dict(parameters=dict(PARAM1=1)))
))
ext.process_instruction(Instruction(
author='a', name='params', args=dict(job=dict(PARAM2=1))
))
assert 'PARAM1' in ext.current.yaml['job']['parameters']
assert 'PARAM2' in ext.current.yaml['job']['parameters']
评论列表
文章目录