def test_generate_lambda_handler(self):
cli._generate_lambda_handler(
{'function': {'module': 'my_module', 'app': 'my_app'}},
output='_slam.yaml')
with open('_slam.yaml') as f:
handler = f.read()
os.remove('_slam.yaml')
self.assertIn('from my_module import my_app', handler)
self.assertIn(''.join(inspect.getsourcelines(
cli._run_lambda_function)[0][1:]), handler)
评论列表
文章目录