Skip to content

Commit

Permalink
Add some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kddejong committed May 25, 2024
1 parent c5670d4 commit 8ecbe5c
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion test/unit/module/test_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,15 @@ def test_get_object_without_conditions(self):
{"Ref": "LaunchConfiguration"},
]
},
"PropertyA": [
{
"Fn::If": [
"useAmiId",
{"Ref": "AWS::NoValue"},
{"Ref": "LaunchConfiguration"},
]
}
],
},
}
},
Expand All @@ -761,7 +770,10 @@ def test_get_object_without_conditions(self):
elif result["Scenario"] == {"useAmiId": False}:
self.assertDictEqual(
result["Object"],
{"LaunchConfiguration": {"Ref": "LaunchConfiguration"}},
{
"LaunchConfiguration": {"Ref": "LaunchConfiguration"},
"PropertyA": [{"Ref": "LaunchConfiguration"}],
},
)

def test_get_object_without_conditions_no_value(self):
Expand Down Expand Up @@ -797,6 +809,15 @@ def test_get_object_without_conditions_no_value(self):
]
},
],
"PropertyA": [
{
"Fn::If": [
"useAmiId",
{"Ref": "AWS::NoValue"},
{"Ref": "LaunchConfiguration"},
]
}
],
},
}
},
Expand Down

0 comments on commit 8ecbe5c

Please sign in to comment.