def testMultiPSScript(self, psscript): """Valid inputs should call PSScript with the appropriate args.""" powershell.MultiPSScript([[SCRIPT], [SCRIPT]], self.bi).Run() psscript.assert_has_calls( [mock.call([SCRIPT], self.bi), mock.call([SCRIPT], self.bi)], any_order=True)
def testMultiPSScriptValidateArgsType(self): """Non-list args should raise ValidationError.""" with self.assertRaises(powershell.ValidationError): powershell.MultiPSScript([[SCRIPT], SCRIPT], self.bi).Validate()
def testMultiPSScriptValidateError(self): """String input should raise ValidationError.""" with self.assertRaises(powershell.ActionError): powershell.MultiPSScript(SCRIPT, self.bi).Validate()
def testMultiPSScriptValidate(self): """Valid inputs should pass validation tests.""" powershell.MultiPSScript([[SCRIPT]], self.bi).Validate()
def testMultiPSScriptIndexError(self): """Missing input fields should raise IndexError.""" with self.assertRaises(powershell.ActionError): powershell.MultiPSScript([[]], self.bi).Run()