def test_run_with_trigger_s3(self, create_artefact_mock, copytree_mock, pip_install_mock):
zip_file = MockZipFile.create_zip("test")
create_artefact_mock.return_value = zip_file
self.deploy = Deploy(path=os.path.dirname(os.path.abspath(__file__)), filename="config_with_triggers.json",
lambdas_to_deploy=["LambdaExample_S3_7", ])
# TODO: Search why moto rise errors
try:
# Create lambdas
self.deploy.run("myexamplelambdaproject")
self.assertTrue(pip_install_mock.called)
self.assertTrue(copytree_mock.called)
self.assertTrue(create_artefact_mock.called)
# Update lambdas
self.deploy.run("myexamplelambdaproject")
except ConnectionError as e:
print(e)
os.remove(zip_file)
评论列表
文章目录