Skip to content

Commit

Permalink
Merge pull request #1 from zachzeid/bug/encryption-flake8
Browse files Browse the repository at this point in the history
Fixed flake8 issues.
  • Loading branch information
zachzeid authored Aug 30, 2018
2 parents 2bebc7c + f54f89f commit 714d5d8
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions terrascan/checks/encryption.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

"""Tests for encryption configuration in terraform templates"""

import unittest
import os
import unittest

import terraform_validate


Expand Down Expand Up @@ -93,7 +94,7 @@ def test_aws_api_gateway_domain_name_certificate(self):
'certificate_name',
'certificate_body',
'certificate_chain',
'certificate_private_key'
'certificate_private_key',
])

def test_aws_instance_ebs_block_device_encrypted(self):
Expand All @@ -112,7 +113,7 @@ def test_aws_cloudfront_distribution_origin_protocol_policy(self):
'aws_cloudfront_distribution').property(
'origin').property(
'custom_origin_config').property(
'origin_protocol_policy').should_equal("https-only")
'origin_protocol_policy').should_equal('https-only')

def test_aws_cloudfront_distribution_def_cache_viewer_prot_policy(self):
# Assert that cache protocol doesn't allow all
Expand All @@ -121,15 +122,15 @@ def test_aws_cloudfront_distribution_def_cache_viewer_prot_policy(self):
self.v.resources(
'aws_cloudfront_distribution').property(
'default_cache_behavior').property(
'viewer_protocol_policy').should_not_equal("allow-all")
'viewer_protocol_policy').should_not_equal('allow-all')

def test_aws_cloudfront_distribution_cache_beh_viewer_proto_policy(self):
# Assert that cache protocol doesn't allow all
self.v.enable_variable_expansion()
self.v.resources(
'aws_cloudfront_distribution').property(
'cache_behavior').property(
'viewer_protocol_policy').should_not_equal("allow-all")
'viewer_protocol_policy').should_not_equal('allow-all')

def test_aws_cloudtrail_kms(self):
# Assert that a KMS key has been provided
Expand Down Expand Up @@ -181,7 +182,7 @@ def test_aws_dms_endpoint_kms(self):
self.v.resources(
'aws_dms_endpoint').should_have_properties(
[
'kms_key_arn'
'kms_key_arn',
])

def test_aws_dms_endpoint_certificate(self):
Expand All @@ -191,7 +192,7 @@ def test_aws_dms_endpoint_certificate(self):
self.v.resources(
'aws_dms_endpoint').should_have_properties(
[
'certificate_arn'
'certificate_arn',
])

def test_aws_dms_replication_instance_kms(self):
Expand Down Expand Up @@ -335,7 +336,7 @@ def test_aws_s3_bucket_object_encryption(self):
self.v.enable_variable_expansion()
self.v.resources(
'aws_s3_bucket_object').property(
'server_side_encryption').should_equal("aws:kms")
'server_side_encryption').should_equal('aws:kms')

def test_aws_s3_bucket_object_kms(self):
# Assert resource has a KMS with CMKs
Expand Down

0 comments on commit 714d5d8

Please sign in to comment.