def test_to_string(self): stack = mock.MagicMock() self.assertIn("Heat Stack", heat.Stacks(self.creds_manager).to_str(stack))
def test_disable(self): stack = mock.MagicMock() with self.assertLogs(level='WARNING'): heat.Stacks(self.creds_manager).disable(stack)
def test_list_with_service(self): self.cloud.has_service.return_value = True self.assertIs(self.cloud.list_stacks.return_value, heat.Stacks(self.creds_manager).list()) self.cloud.list_stacks.assert_called_once_with()
def test_delete(self): stack = mock.MagicMock() self.assertIsNone(heat.Stacks(self.creds_manager).delete(stack)) self.cloud.delete_stack.assert_called_once_with(stack['id'], wait=True)
def test_list_without_service(self): self.cloud.has_service.return_value = False self.assertEqual(heat.Stacks(self.creds_manager).list(), []) self.cloud.list_stacks.assert_not_called()