def test_or(self): ret = functions.c_or('Thing 1', 'Thing 2') self.assertEqual(ret['Fn::Or'], ['Thing 1', 'Thing 2'])
def test_or_max(self): with self.assertRaises(exceptions.IntrinsicFuncInputError) as ctx: functions.c_or(*['%d Condition' % i for i in range(20)]) self.assertEqual(ctx.exception.message, functions.c_or._errmsg_max)
def test_or_min(self): with self.assertRaises(exceptions.IntrinsicFuncInputError) as ctx: functions.c_or('1 Condition') self.assertEqual(ctx.exception.message, functions.c_or._errmsg_min)