From 7dd5b000f0786e541bc8bb8c91fbe67fd2df62a9 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Mon, 3 Aug 2020 12:13:18 -0700 Subject: [PATCH 1/4] fix: Get CI passing again --- test/unit/caches/test_local.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/unit/caches/test_local.py b/test/unit/caches/test_local.py index 6fd68c72f..6b66434c3 100644 --- a/test/unit/caches/test_local.py +++ b/test/unit/caches/test_local.py @@ -300,6 +300,8 @@ def patch_get_single_entry(mocker): def test_get_encryption_materials(patch_get_single_entry): cache = build_lcmc() + sentinel.plaintext_length = int() + test = cache.get_encryption_materials(cache_key=sentinel.cache_key, plaintext_length=sentinel.plaintext_length) patch_get_single_entry.assert_called_once_with(sentinel.cache_key) From 641ce1897a34e3dc0d7cbbf5d284203f65b30048 Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Mon, 3 Aug 2020 12:15:24 -0700 Subject: [PATCH 2/4] chore: run autoformat --- src/aws_encryption_sdk/keyrings/aws_kms/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/aws_encryption_sdk/keyrings/aws_kms/__init__.py b/src/aws_encryption_sdk/keyrings/aws_kms/__init__.py index f6340af65..cae6525a1 100644 --- a/src/aws_encryption_sdk/keyrings/aws_kms/__init__.py +++ b/src/aws_encryption_sdk/keyrings/aws_kms/__init__.py @@ -25,6 +25,7 @@ try: # Python 3.5.0 and 3.5.1 have incompatible typing modules from typing import Dict, Iterable, Union # noqa pylint: disable=unused-import + from .client_suppliers import ClientSupplierType # noqa pylint: disable=unused-import except ImportError: # pragma: no cover # We only actually need these imports when running the mypy checks From 8f773d42bd9aa167c560745c4bd1e5f8219da060 Mon Sep 17 00:00:00 2001 From: MatthewBennington Date: Mon, 3 Aug 2020 12:56:22 -0700 Subject: [PATCH 3/4] Update test/unit/caches/test_local.py Co-authored-by: Matt Bullock --- test/unit/caches/test_local.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/caches/test_local.py b/test/unit/caches/test_local.py index 6b66434c3..42139abd0 100644 --- a/test/unit/caches/test_local.py +++ b/test/unit/caches/test_local.py @@ -300,7 +300,7 @@ def patch_get_single_entry(mocker): def test_get_encryption_materials(patch_get_single_entry): cache = build_lcmc() - sentinel.plaintext_length = int() + plaintext_length = 42 test = cache.get_encryption_materials(cache_key=sentinel.cache_key, plaintext_length=sentinel.plaintext_length) From ed9b7349dcf6fe60de71b898e02b5579a294572a Mon Sep 17 00:00:00 2001 From: Matthew Jones Date: Mon, 3 Aug 2020 13:07:26 -0700 Subject: [PATCH 4/4] fix: pr changes --- test/unit/caches/test_local.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/caches/test_local.py b/test/unit/caches/test_local.py index 42139abd0..db2b21ff1 100644 --- a/test/unit/caches/test_local.py +++ b/test/unit/caches/test_local.py @@ -302,11 +302,11 @@ def test_get_encryption_materials(patch_get_single_entry): plaintext_length = 42 - test = cache.get_encryption_materials(cache_key=sentinel.cache_key, plaintext_length=sentinel.plaintext_length) + test = cache.get_encryption_materials(cache_key=sentinel.cache_key, plaintext_length=plaintext_length) patch_get_single_entry.assert_called_once_with(sentinel.cache_key) patch_get_single_entry.return_value._update_with_message_bytes_encrypted.assert_called_once_with( - sentinel.plaintext_length + plaintext_length ) assert test is patch_get_single_entry.return_value