-
Notifications
You must be signed in to change notification settings - Fork 86
Adding example one_kms_cmk #158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…n-sdk-python into mmegs-examples
import botocore.session | ||
import pytest | ||
|
||
from ..src.basic_encryption import cycle_string | ||
from .examples_test_utils import get_cmk_arn | ||
from .examples_test_utils import static_plaintext |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We prefer to have all imports from the same module in the same import statement.
|
||
def test_one_kms_cmk_streaming_data(): | ||
cmk_arn = get_cmk_arn() | ||
handle, filename = tempfile.mkstemp() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't use handle
, so we should be explicit about that in its naming.
https://www.python.org/dev/peps/pep-0008/#method-names-and-instance-variables
handle, filename = tempfile.mkstemp() | |
_handle, filename = tempfile.mkstemp() |
The AppVeyor failures are expected, unfortunately. We need to figure out why (#159), but they're failing across the board, not just for this PR. |
…ged name of instance variable
for f in new_files: | ||
os.remove(f) | ||
finally: | ||
os.close(_handle) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, that was my mistake. I missed that we do actually use this. Sorry about that.
os.close(_handle) | |
os.close(handle) |
|
||
def test_one_kms_cmk_streaming_data(): | ||
cmk_arn = get_cmk_arn() | ||
_handle, filename = tempfile.mkstemp() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_handle, filename = tempfile.mkstemp() | |
handle, filename = tempfile.mkstemp() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed it back
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.