116
116
self.assertTrue(self.LaunchpadTrigger.close_bugs.call_count == 1)
117
117
self.MergeProposalReview.unlock.assert_called_once_with()
119
class TestAutolandWithMultipleDputs(TestAutolandForMergeAndCommit):
120
def test_multiple_dputs(self):
121
sys_argv = ['autoland.py', '-r', 'PASSED',
122
'-v', '123', '-m', 'url', '-p', 'ppa:myppa,ppa:myppa2',
123
'-d', 'quantal,precise']
124
dputRunner = MagicMock()
125
with patch('sys.argv', sys_argv), \
126
util.captured_stderr() as stderr, \
127
patch('autoland.DputRunner', new=dputRunner):
128
self.assertTrue(autoland.main() == 0)
129
ppas_expected = ['ppa:myppa', 'ppa:myppa2']
130
distributions_expected = ['quantal', 'precise']
131
self.assertEquals(ppas_expected, dputRunner.call_args[1]['ppas'])
132
self.assertEquals(distributions_expected,
133
dputRunner.call_args[1]['distributions'])
120
135
class TestAutolandMergeCommitAndDput(TestAutolandForMergeAndCommit):