def test_merge_wip_skip_outdated():
from jenkins_epo.extensions.core import MergerExtension
ext = MergerExtension('merger', Mock())
ext.current = Mock()
ext.current.SETTINGS.COLLABORATORS = ['collaborator']
ext.current.last_commit.date = datetime.now()
ext.current.opm.author = 'collaborator'
ext.current.opm.date = datetime.now()
ext.current.opm_denied = []
ext.current.wip = True
ext.current.opm_processed = Mock(
date=ext.current.opm.date + timedelta(minutes=5)
)
yield from ext.run()
assert not ext.current.head.comment.mock_calls
assert not ext.current.head.merge.mock_calls
评论列表
文章目录