Skip to content

Commit d7da037

Browse files
authoredJun 7, 2020
Merge pull request #1 from Kudbettin/Kudbettin-patch-1
Kudbettin patch 1
2 parents b16012e + 5a8f272 commit d7da037

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed
 

‎terraform_compliance/steps/then/it_must_contain_something.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def it_must_contain_something(_step_obj, something, inherited_values=Null):
4040

4141
if isinstance(found_key, dict):
4242
found_value = jsonify(found_key.get(something, found_key))
43-
found_value = found_value if found_value != [] and found_value != '' else found_key
43+
found_value = found_value if found_value not in ([], '') else found_key
4444
else:
4545
found_value = found_key
4646
elif isinstance(values, list):
@@ -138,7 +138,7 @@ def it_must_not_contain_something(_step_obj, something, inherited_values=Null):
138138

139139
if isinstance(found_key, dict):
140140
found_value = jsonify(found_key.get(something, found_key))
141-
found_value = found_value if found_value != [] and found_value != '' else found_key
141+
found_value = found_value if found_value not in ([], '') else found_key
142142
else:
143143
found_value = found_key
144144
elif isinstance(values, list):

‎tests/functional/test_issue-249-has/test.feature

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ Feature: Resources should be properly tagged
99
Scenario: Ensure that waf_policy for ALB/CF tag is defined
1010
Given I have aws_alb defined
1111
When it has tags
12+
Then it must contain tags
1213
Then it must contain waf_policy
1314
And its value must match the "^(internal|external|custom)$" regex
1415

1516
Scenario: Ensure that waf_custom for ALB/CF tag is defined
1617
Given I have aws_alb defined
1718
When it has tags
18-
Then it must contain waf_custom
19+
Then it must contain waf_custom

0 commit comments

Comments
 (0)