Skip to content

Commit 5a8f272

Browse files
authored
Update it_must_contain_something.py
1 parent 16cfe45 commit 5a8f272

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
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):

0 commit comments

Comments
 (0)