From eccb536d8adcf65cbc7d016da9a33b8711a9083f Mon Sep 17 00:00:00 2001 From: Terry Cain Date: Sat, 28 Oct 2017 17:07:34 +0100 Subject: [PATCH] ACM ~100% coverage --- IMPLEMENTATION_COVERAGE.md | 22 +++++++++++----------- tests/test_acm/test_acm.py | 13 +++++++++++++ 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/IMPLEMENTATION_COVERAGE.md b/IMPLEMENTATION_COVERAGE.md index f97963a7b..7f6e87018 100644 --- a/IMPLEMENTATION_COVERAGE.md +++ b/IMPLEMENTATION_COVERAGE.md @@ -1699,17 +1699,17 @@ - [ ] start_db_instance - [ ] stop_db_instance -## acm - 50% implemented -- [X] add_tags_to_certificate -- [X] delete_certificate -- [ ] describe_certificate -- [X] get_certificate -- [ ] import_certificate -- [ ] list_certificates -- [ ] list_tags_for_certificate -- [X] remove_tags_from_certificate -- [X] request_certificate -- [ ] resend_validation_email +## acm - 100% implemented +- [x] add_tags_to_certificate +- [x] delete_certificate +- [x] describe_certificate +- [x] get_certificate +- [x] import_certificate +- [x] list_certificates +- [x] list_tags_for_certificate +- [x] remove_tags_from_certificate +- [x] request_certificate +- [x] resend_validation_email ## elasticache - 0% implemented - [ ] add_tags_to_resource diff --git a/tests/test_acm/test_acm.py b/tests/test_acm/test_acm.py index db1969645..ccac48181 100644 --- a/tests/test_acm/test_acm.py +++ b/tests/test_acm/test_acm.py @@ -4,6 +4,7 @@ import os import boto3 from freezegun import freeze_time import sure # noqa +import uuid from botocore.exceptions import ClientError @@ -281,11 +282,23 @@ def test_resend_validation_email_invalid(): def test_request_certificate(): client = boto3.client('acm', region_name='eu-central-1') + token = str(uuid.uuid4()) + resp = client.request_certificate( DomainName='google.com', + IdempotencyToken=token, SubjectAlternativeNames=['google.com', 'www.google.com', 'mail.google.com'], ) resp.should.contain('CertificateArn') + arn = resp['CertificateArn'] + + resp = client.request_certificate( + DomainName='google.com', + IdempotencyToken=token, + SubjectAlternativeNames=['google.com', 'www.google.com', 'mail.google.com'], + ) + resp['CertificateArn'].should.equal(arn) + @mock_acm def test_request_certificate_no_san():