Skip to content

Commit

Permalink
restore sentinel style tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-harvey-z3q committed Mar 23, 2024
1 parent ceeef50 commit 0eba7f7
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions tests/test_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,24 +558,17 @@ def test_describe_resources_sends_correct_request(self):

@patch("sceptre.plan.actions.StackActions.describe")
def test_describe_outputs_sends_correct_request(self, mock_describe):
expected_outputs = [
{"OutputKey": "MyOutputKey1", "OutputValue": "MyOutputValue1"},
{"OutputKey": "MyOutputKey2", "OutputValue": "MyOutputValue2"},
]

mock_describe.return_value = {"Stacks": [{"Outputs": expected_outputs}]}
mock_describe.return_value = {"Stacks": [{"Outputs": sentinel.outputs}]}
response = self.actions.describe_outputs()

mock_describe.assert_called_once_with()
assert response == {self.stack.name: expected_outputs}
assert response == {self.stack.name: sentinel.outputs}

@patch("sceptre.plan.actions.StackActions.describe")
def test_describe_outputs_handles_stack_with_no_outputs(self, mock_describe):
expected_outputs = []

mock_describe.return_value = {"Stacks": [{"Outputs": expected_outputs}]}
mock_describe.return_value = {"Stacks": [{}]}
response = self.actions.describe_outputs()
assert response == {self.stack.name: expected_outputs}
assert response == {self.stack.name: []}

def test_continue_update_rollback_sends_correct_request(self):
self.actions.continue_update_rollback()
Expand Down

0 comments on commit 0eba7f7

Please sign in to comment.