From aa6b505415631fdc9d96b46dbb3f1dab6d351734 Mon Sep 17 00:00:00 2001 From: mattsb42-aws Date: Tue, 27 Aug 2019 23:55:08 -0700 Subject: [PATCH] fix tests to expect the correct error --- tests/test_kms/test_kms.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/test_kms/test_kms.py b/tests/test_kms/test_kms.py index 49e6e1fd..61c19afb 100644 --- a/tests/test_kms/test_kms.py +++ b/tests/test_kms/test_kms.py @@ -68,12 +68,11 @@ def test_describe_key_via_alias(): @mock_kms_deprecated def test_describe_key_via_alias_not_found(): - # TODO: Fix in next commit: bug. Should (and now does) throw NotFoundError conn = boto.kms.connect_to_region("us-west-2") key = conn.create_key(policy="my policy", description="my key", key_usage="ENCRYPT_DECRYPT") conn.create_alias(alias_name="alias/my-key-alias", target_key_id=key["KeyMetadata"]["KeyId"]) - conn.describe_key.when.called_with("alias/not-found-alias").should.throw(JSONResponseError) + conn.describe_key.when.called_with("alias/not-found-alias").should.throw(NotFoundException) @mock_kms_deprecated @@ -90,9 +89,8 @@ def test_describe_key_via_arn(): @mock_kms_deprecated def test_describe_missing_key(): - # TODO: Fix in next commit: bug. Should (and now does) throw NotFoundError conn = boto.kms.connect_to_region("us-west-2") - conn.describe_key.when.called_with("not-a-key").should.throw(JSONResponseError) + conn.describe_key.when.called_with("not-a-key").should.throw(NotFoundException) @mock_kms_deprecated