Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_run_function(self):
self.assertIsNone(LambdaHandler.run_function(no_args, 'e', 'c'))
self.assertEqual(LambdaHandler.run_function(one_arg, 'e', 'c'), 'e')
self.assertEqual(LambdaHandler.run_function(two_args, 'e', 'c'), ('e', 'c'))
self.assertEqual(LambdaHandler.run_function(var_args, 'e', 'c'), ('e', 'c'))
self.assertEqual(LambdaHandler.run_function(var_args_with_one, 'e', 'c'), ('e', 'c'))
try:
LambdaHandler.run_function(unsupported, 'e', 'c')
self.fail('Exception expected')
except RuntimeError as e:
pass
def test_run_function(self):
self.assertIsNone(LambdaHandler.run_function(no_args, 'e', 'c'))
self.assertEqual(LambdaHandler.run_function(one_arg, 'e', 'c'), 'e')
self.assertEqual(LambdaHandler.run_function(two_args, 'e', 'c'), ('e', 'c'))
self.assertEqual(LambdaHandler.run_function(var_args, 'e', 'c'), ('e', 'c'))
self.assertEqual(LambdaHandler.run_function(var_args_with_one, 'e', 'c'), ('e', 'c'))
try:
LambdaHandler.run_function(unsupported, 'e', 'c')
self.fail('Exception expected')
except RuntimeError as e:
pass
def test_run_function(self):
self.assertIsNone(LambdaHandler.run_function(no_args, 'e', 'c'))
self.assertEqual(LambdaHandler.run_function(one_arg, 'e', 'c'), 'e')
self.assertEqual(LambdaHandler.run_function(two_args, 'e', 'c'), ('e', 'c'))
self.assertEqual(LambdaHandler.run_function(var_args, 'e', 'c'), ('e', 'c'))
self.assertEqual(LambdaHandler.run_function(var_args_with_one, 'e', 'c'), ('e', 'c'))
try:
LambdaHandler.run_function(unsupported, 'e', 'c')
self.fail('Exception expected')
except RuntimeError as e:
pass
def test_run_function(self):
self.assertIsNone(LambdaHandler.run_function(no_args, 'e', 'c'))
self.assertEqual(LambdaHandler.run_function(one_arg, 'e', 'c'), 'e')
self.assertEqual(LambdaHandler.run_function(two_args, 'e', 'c'), ('e', 'c'))
self.assertEqual(LambdaHandler.run_function(var_args, 'e', 'c'), ('e', 'c'))
self.assertEqual(LambdaHandler.run_function(var_args_with_one, 'e', 'c'), ('e', 'c'))
try:
LambdaHandler.run_function(unsupported, 'e', 'c')
self.fail('Exception expected')
except RuntimeError as e:
pass