We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
CloudFormation's GetTemplate response is inaccurate
The GetTemplate function returns through `boto` the following format:

``` python
>>> import boto.cloudformation
>>> cf = boto.cloudformation.connect_to_region('us-east-1')
>>> cf.get_template('<my-stack-id>')
{u'GetTemplateResponse': {u'GetTemplateResult': {u'TemplateBody': u'{"Resources": "<RESOURCES HERE>"}', u'ResponseMetadata': {u'RequestId': u'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee'}}}
```

But moto returns just the template body... Moto's source: https://github.com/spulec/moto/blob/1dcfcbca5711ac50f9c3314b8a7e8812e3025156/moto/cloudformation/responses.py#L87-L91

AWS Docs: http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_GetTemplate.html


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `moto/cloudformation/responses.py`
Content:
```
1 from __future__ import unicode_literals
2 
3 import json
4 from six.moves.urllib.parse import urlparse
5 
6 from moto.core.responses import BaseResponse
7 from moto.s3 import s3_backend
8 from .models import cloudformation_backends
9 
10 
11 class CloudFormationResponse(BaseResponse):
12 
13     @property
14     def cloudformation_backend(self):
15         return cloudformation_backends[self.region]
16 
17     def _get_stack_from_s3_url(self, template_url):
18         template_url_parts = urlparse(template_url)
19         bucket_name = template_url_parts.netloc.split(".")[0]
20         key_name = template_url_parts.path.lstrip("/")
21 
22         key = s3_backend.get_key(bucket_name, key_name)
23         return key.value.decode("utf-8")
24 
25     def create_stack(self):
26         stack_name = self._get_param('StackName')
27         stack_body = self._get_param('TemplateBody')
28         template_url = self._get_param('TemplateURL')
29         parameters_list = self._get_list_prefix("Parameters.member")
30         tags = dict((item['key'], item['value']) for item in self._get_list_prefix("Tags.member"))
31 
32         # Hack dict-comprehension
33         parameters = dict([
34             (parameter['parameter_key'], parameter['parameter_value'])
35             for parameter
36             in parameters_list
37         ])
38         if template_url:
39             stack_body = self._get_stack_from_s3_url(template_url)
40         stack_notification_arns = self._get_multi_param('NotificationARNs.member')
41 
42         stack = self.cloudformation_backend.create_stack(
43             name=stack_name,
44             template=stack_body,
45             parameters=parameters,
46             region_name=self.region,
47             notification_arns=stack_notification_arns,
48             tags=tags,
49         )
50         stack_body = {
51             'CreateStackResponse': {
52                 'CreateStackResult': {
53                     'StackId': stack.stack_id,
54                 }
55             }
56         }
57         return json.dumps(stack_body)
58 
59     def describe_stacks(self):
60         stack_name_or_id = None
61         if self._get_param('StackName'):
62             stack_name_or_id = self.querystring.get('StackName')[0]
63         stacks = self.cloudformation_backend.describe_stacks(stack_name_or_id)
64 
65         template = self.response_template(DESCRIBE_STACKS_TEMPLATE)
66         return template.render(stacks=stacks)
67 
68     def describe_stack_resources(self):
69         stack_name = self._get_param('StackName')
70         stack = self.cloudformation_backend.get_stack(stack_name)
71 
72         template = self.response_template(DESCRIBE_STACKS_RESOURCES_RESPONSE)
73         return template.render(stack=stack)
74 
75     def list_stacks(self):
76         stacks = self.cloudformation_backend.list_stacks()
77         template = self.response_template(LIST_STACKS_RESPONSE)
78         return template.render(stacks=stacks)
79 
80     def list_stack_resources(self):
81         stack_name_or_id = self._get_param('StackName')
82         resources = self.cloudformation_backend.list_stack_resources(stack_name_or_id)
83 
84         template = self.response_template(LIST_STACKS_RESOURCES_RESPONSE)
85         return template.render(resources=resources)
86 
87     def get_template(self):
88         name_or_stack_id = self.querystring.get('StackName')[0]
89 
90         stack = self.cloudformation_backend.get_stack(name_or_stack_id)
91         return stack.template
92 
93     def update_stack(self):
94         stack_name = self._get_param('StackName')
95         stack_body = self._get_param('TemplateBody')
96 
97         stack = self.cloudformation_backend.update_stack(
98             name=stack_name,
99             template=stack_body,
100         )
101         stack_body = {
102             'UpdateStackResponse': {
103                 'UpdateStackResult': {
104                     'StackId': stack.name,
105                 }
106             }
107         }
108         return json.dumps(stack_body)
109 
110     def delete_stack(self):
111         name_or_stack_id = self.querystring.get('StackName')[0]
112 
113         self.cloudformation_backend.delete_stack(name_or_stack_id)
114         return json.dumps({
115             'DeleteStackResponse': {
116                 'DeleteStackResult': {},
117             }
118         })
119 
120 
121 DESCRIBE_STACKS_TEMPLATE = """<DescribeStacksResult>
122   <Stacks>
123     {% for stack in stacks %}
124     <member>
125       <StackName>{{ stack.name }}</StackName>
126       <StackId>{{ stack.stack_id }}</StackId>
127       <CreationTime>2010-07-27T22:28:28Z</CreationTime>
128       <StackStatus>{{ stack.status }}</StackStatus>
129       {% if stack.notification_arns %}
130       <NotificationARNs>
131         {% for notification_arn in stack.notification_arns %}
132         <member>{{ notification_arn }}</member>
133         {% endfor %}
134       </NotificationARNs>
135       {% else %}
136       <NotificationARNs/>
137       {% endif %}
138       <DisableRollback>false</DisableRollback>
139       <Outputs>
140       {% for output in stack.stack_outputs %}
141         <member>
142           <OutputKey>{{ output.key }}</OutputKey>
143           <OutputValue>{{ output.value }}</OutputValue>
144         </member>
145       {% endfor %}
146       </Outputs>
147       <Parameters>
148       {% for param_name, param_value in stack.stack_parameters.items() %}
149         <member>
150           <ParameterKey>{{ param_name }}</ParameterKey>
151           <ParameterValue>{{ param_value }}</ParameterValue>
152         </member>
153       {% endfor %}
154       </Parameters>
155       <Tags>
156         {% for tag_key, tag_value in stack.tags.items() %}
157           <member>
158             <Key>{{ tag_key }}</Key>
159             <Value>{{ tag_value }}</Value>
160           </member>
161         {% endfor %}
162       </Tags>
163     </member>
164     {% endfor %}
165   </Stacks>
166 </DescribeStacksResult>"""
167 
168 
169 LIST_STACKS_RESPONSE = """<ListStacksResponse>
170  <ListStacksResult>
171   <StackSummaries>
172     {% for stack in stacks %}
173     <member>
174         <StackId>{{ stack.stack_id }}</StackId>
175         <StackStatus>{{ stack.status }}</StackStatus>
176         <StackName>{{ stack.name }}</StackName>
177         <CreationTime>2011-05-23T15:47:44Z</CreationTime>
178         <TemplateDescription>{{ stack.description }}</TemplateDescription>
179     </member>
180     {% endfor %}
181   </StackSummaries>
182  </ListStacksResult>
183 </ListStacksResponse>"""
184 
185 
186 DESCRIBE_STACKS_RESOURCES_RESPONSE = """<DescribeStackResourcesResult>
187   <StackResources>
188     {% for resource in stack.stack_resources %}
189     <member>
190       <StackId>{{ stack.stack_id }}</StackId>
191       <StackName>{{ stack.name }}</StackName>
192       <LogicalResourceId>{{ resource.logical_resource_id }}</LogicalResourceId>
193       <PhysicalResourceId>{{ resource.physical_resource_id }}</PhysicalResourceId>
194       <ResourceType>{{ resource.type }}</ResourceType>
195       <Timestamp>2010-07-27T22:27:28Z</Timestamp>
196       <ResourceStatus>{{ stack.status }}</ResourceStatus>
197     </member>
198     {% endfor %}
199   </StackResources>
200 </DescribeStackResourcesResult>"""
201 
202 
203 LIST_STACKS_RESOURCES_RESPONSE = """<ListStackResourcesResponse>
204   <ListStackResourcesResult>
205     <StackResourceSummaries>
206       {% for resource in resources %}
207       <member>
208         <ResourceStatus>CREATE_COMPLETE</ResourceStatus>
209         <LogicalResourceId>{{ resource.logical_resource_id }}</LogicalResourceId>
210         <LastUpdatedTimestamp>2011-06-21T20:15:58Z</LastUpdatedTimestamp>
211         <PhysicalResourceId>{{ resource.physical_resource_id }}</PhysicalResourceId>
212         <ResourceType>{{ resource.type }}</ResourceType>
213       </member>
214       {% endfor %}
215     </StackResourceSummaries>
216   </ListStackResourcesResult>
217   <ResponseMetadata>
218     <RequestId>2d06e36c-ac1d-11e0-a958-f9382b6eb86b</RequestId>
219   </ResponseMetadata>
220 </ListStackResourcesResponse>"""
221
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/moto/cloudformation/responses.py b/moto/cloudformation/responses.py
--- a/moto/cloudformation/responses.py
+++ b/moto/cloudformation/responses.py
@@ -86,9 +86,19 @@
 
     def get_template(self):
         name_or_stack_id = self.querystring.get('StackName')[0]
-
         stack = self.cloudformation_backend.get_stack(name_or_stack_id)
-        return stack.template
+
+        response = {
+            "GetTemplateResponse": {
+            "GetTemplateResult": {
+                "TemplateBody": stack.template,
+                "ResponseMetadata": {
+                    "RequestId": "2d06e36c-ac1d-11e0-a958-f9382b6eb86bEXAMPLE"
+                }
+            }
+          }
+        }
+        return json.dumps(response)
 
     def update_stack(self):
         stack_name = self._get_param('StackName')

{"golden_diff": "diff --git a/moto/cloudformation/responses.py b/moto/cloudformation/responses.py\n--- a/moto/cloudformation/responses.py\n+++ b/moto/cloudformation/responses.py\n@@ -86,9 +86,19 @@\n \n     def get_template(self):\n         name_or_stack_id = self.querystring.get('StackName')[0]\n-\n         stack = self.cloudformation_backend.get_stack(name_or_stack_id)\n-        return stack.template\n+\n+        response = {\n+            \"GetTemplateResponse\": {\n+            \"GetTemplateResult\": {\n+                \"TemplateBody\": stack.template,\n+                \"ResponseMetadata\": {\n+                    \"RequestId\": \"2d06e36c-ac1d-11e0-a958-f9382b6eb86bEXAMPLE\"\n+                }\n+            }\n+          }\n+        }\n+        return json.dumps(response)\n \n     def update_stack(self):\n         stack_name = self._get_param('StackName')\n", "issue": "CloudFormation's GetTemplate response is inaccurate\nThe GetTemplate function returns through `boto` the following format:\n\n``` python\n>>> import boto.cloudformation\n>>> cf = boto.cloudformation.connect_to_region('us-east-1')\n>>> cf.get_template('<my-stack-id>')\n{u'GetTemplateResponse': {u'GetTemplateResult': {u'TemplateBody': u'{\"Resources\": \"<RESOURCES HERE>\"}', u'ResponseMetadata': {u'RequestId': u'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee'}}}\n```\n\nBut moto returns just the template body... Moto's source: https://github.com/spulec/moto/blob/1dcfcbca5711ac50f9c3314b8a7e8812e3025156/moto/cloudformation/responses.py#L87-L91\n\nAWS Docs: http://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_GetTemplate.html\n\n", "before_files": [{"content": "from __future__ import unicode_literals\n\nimport json\nfrom six.moves.urllib.parse import urlparse\n\nfrom moto.core.responses import BaseResponse\nfrom moto.s3 import s3_backend\nfrom .models import cloudformation_backends\n\n\nclass CloudFormationResponse(BaseResponse):\n\n    @property\n    def cloudformation_backend(self):\n        return cloudformation_backends[self.region]\n\n    def _get_stack_from_s3_url(self, template_url):\n        template_url_parts = urlparse(template_url)\n        bucket_name = template_url_parts.netloc.split(\".\")[0]\n        key_name = template_url_parts.path.lstrip(\"/\")\n\n        key = s3_backend.get_key(bucket_name, key_name)\n        return key.value.decode(\"utf-8\")\n\n    def create_stack(self):\n        stack_name = self._get_param('StackName')\n        stack_body = self._get_param('TemplateBody')\n        template_url = self._get_param('TemplateURL')\n        parameters_list = self._get_list_prefix(\"Parameters.member\")\n        tags = dict((item['key'], item['value']) for item in self._get_list_prefix(\"Tags.member\"))\n\n        # Hack dict-comprehension\n        parameters = dict([\n            (parameter['parameter_key'], parameter['parameter_value'])\n            for parameter\n            in parameters_list\n        ])\n        if template_url:\n            stack_body = self._get_stack_from_s3_url(template_url)\n        stack_notification_arns = self._get_multi_param('NotificationARNs.member')\n\n        stack = self.cloudformation_backend.create_stack(\n            name=stack_name,\n            template=stack_body,\n            parameters=parameters,\n            region_name=self.region,\n            notification_arns=stack_notification_arns,\n            tags=tags,\n        )\n        stack_body = {\n            'CreateStackResponse': {\n                'CreateStackResult': {\n                    'StackId': stack.stack_id,\n                }\n            }\n        }\n        return json.dumps(stack_body)\n\n    def describe_stacks(self):\n        stack_name_or_id = None\n        if self._get_param('StackName'):\n            stack_name_or_id = self.querystring.get('StackName')[0]\n        stacks = self.cloudformation_backend.describe_stacks(stack_name_or_id)\n\n        template = self.response_template(DESCRIBE_STACKS_TEMPLATE)\n        return template.render(stacks=stacks)\n\n    def describe_stack_resources(self):\n        stack_name = self._get_param('StackName')\n        stack = self.cloudformation_backend.get_stack(stack_name)\n\n        template = self.response_template(DESCRIBE_STACKS_RESOURCES_RESPONSE)\n        return template.render(stack=stack)\n\n    def list_stacks(self):\n        stacks = self.cloudformation_backend.list_stacks()\n        template = self.response_template(LIST_STACKS_RESPONSE)\n        return template.render(stacks=stacks)\n\n    def list_stack_resources(self):\n        stack_name_or_id = self._get_param('StackName')\n        resources = self.cloudformation_backend.list_stack_resources(stack_name_or_id)\n\n        template = self.response_template(LIST_STACKS_RESOURCES_RESPONSE)\n        return template.render(resources=resources)\n\n    def get_template(self):\n        name_or_stack_id = self.querystring.get('StackName')[0]\n\n        stack = self.cloudformation_backend.get_stack(name_or_stack_id)\n        return stack.template\n\n    def update_stack(self):\n        stack_name = self._get_param('StackName')\n        stack_body = self._get_param('TemplateBody')\n\n        stack = self.cloudformation_backend.update_stack(\n            name=stack_name,\n            template=stack_body,\n        )\n        stack_body = {\n            'UpdateStackResponse': {\n                'UpdateStackResult': {\n                    'StackId': stack.name,\n                }\n            }\n        }\n        return json.dumps(stack_body)\n\n    def delete_stack(self):\n        name_or_stack_id = self.querystring.get('StackName')[0]\n\n        self.cloudformation_backend.delete_stack(name_or_stack_id)\n        return json.dumps({\n            'DeleteStackResponse': {\n                'DeleteStackResult': {},\n            }\n        })\n\n\nDESCRIBE_STACKS_TEMPLATE = \"\"\"<DescribeStacksResult>\n  <Stacks>\n    {% for stack in stacks %}\n    <member>\n      <StackName>{{ stack.name }}</StackName>\n      <StackId>{{ stack.stack_id }}</StackId>\n      <CreationTime>2010-07-27T22:28:28Z</CreationTime>\n      <StackStatus>{{ stack.status }}</StackStatus>\n      {% if stack.notification_arns %}\n      <NotificationARNs>\n        {% for notification_arn in stack.notification_arns %}\n        <member>{{ notification_arn }}</member>\n        {% endfor %}\n      </NotificationARNs>\n      {% else %}\n      <NotificationARNs/>\n      {% endif %}\n      <DisableRollback>false</DisableRollback>\n      <Outputs>\n      {% for output in stack.stack_outputs %}\n        <member>\n          <OutputKey>{{ output.key }}</OutputKey>\n          <OutputValue>{{ output.value }}</OutputValue>\n        </member>\n      {% endfor %}\n      </Outputs>\n      <Parameters>\n      {% for param_name, param_value in stack.stack_parameters.items() %}\n        <member>\n          <ParameterKey>{{ param_name }}</ParameterKey>\n          <ParameterValue>{{ param_value }}</ParameterValue>\n        </member>\n      {% endfor %}\n      </Parameters>\n      <Tags>\n        {% for tag_key, tag_value in stack.tags.items() %}\n          <member>\n            <Key>{{ tag_key }}</Key>\n            <Value>{{ tag_value }}</Value>\n          </member>\n        {% endfor %}\n      </Tags>\n    </member>\n    {% endfor %}\n  </Stacks>\n</DescribeStacksResult>\"\"\"\n\n\nLIST_STACKS_RESPONSE = \"\"\"<ListStacksResponse>\n <ListStacksResult>\n  <StackSummaries>\n    {% for stack in stacks %}\n    <member>\n        <StackId>{{ stack.stack_id }}</StackId>\n        <StackStatus>{{ stack.status }}</StackStatus>\n        <StackName>{{ stack.name }}</StackName>\n        <CreationTime>2011-05-23T15:47:44Z</CreationTime>\n        <TemplateDescription>{{ stack.description }}</TemplateDescription>\n    </member>\n    {% endfor %}\n  </StackSummaries>\n </ListStacksResult>\n</ListStacksResponse>\"\"\"\n\n\nDESCRIBE_STACKS_RESOURCES_RESPONSE = \"\"\"<DescribeStackResourcesResult>\n  <StackResources>\n    {% for resource in stack.stack_resources %}\n    <member>\n      <StackId>{{ stack.stack_id }}</StackId>\n      <StackName>{{ stack.name }}</StackName>\n      <LogicalResourceId>{{ resource.logical_resource_id }}</LogicalResourceId>\n      <PhysicalResourceId>{{ resource.physical_resource_id }}</PhysicalResourceId>\n      <ResourceType>{{ resource.type }}</ResourceType>\n      <Timestamp>2010-07-27T22:27:28Z</Timestamp>\n      <ResourceStatus>{{ stack.status }}</ResourceStatus>\n    </member>\n    {% endfor %}\n  </StackResources>\n</DescribeStackResourcesResult>\"\"\"\n\n\nLIST_STACKS_RESOURCES_RESPONSE = \"\"\"<ListStackResourcesResponse>\n  <ListStackResourcesResult>\n    <StackResourceSummaries>\n      {% for resource in resources %}\n      <member>\n        <ResourceStatus>CREATE_COMPLETE</ResourceStatus>\n        <LogicalResourceId>{{ resource.logical_resource_id }}</LogicalResourceId>\n        <LastUpdatedTimestamp>2011-06-21T20:15:58Z</LastUpdatedTimestamp>\n        <PhysicalResourceId>{{ resource.physical_resource_id }}</PhysicalResourceId>\n        <ResourceType>{{ resource.type }}</ResourceType>\n      </member>\n      {% endfor %}\n    </StackResourceSummaries>\n  </ListStackResourcesResult>\n  <ResponseMetadata>\n    <RequestId>2d06e36c-ac1d-11e0-a958-f9382b6eb86b</RequestId>\n  </ResponseMetadata>\n</ListStackResourcesResponse>\"\"\"\n", "path": "moto/cloudformation/responses.py"}], "after_files": [{"content": "from __future__ import unicode_literals\n\nimport json\nfrom six.moves.urllib.parse import urlparse\n\nfrom moto.core.responses import BaseResponse\nfrom moto.s3 import s3_backend\nfrom .models import cloudformation_backends\n\n\nclass CloudFormationResponse(BaseResponse):\n\n    @property\n    def cloudformation_backend(self):\n        return cloudformation_backends[self.region]\n\n    def _get_stack_from_s3_url(self, template_url):\n        template_url_parts = urlparse(template_url)\n        bucket_name = template_url_parts.netloc.split(\".\")[0]\n        key_name = template_url_parts.path.lstrip(\"/\")\n\n        key = s3_backend.get_key(bucket_name, key_name)\n        return key.value.decode(\"utf-8\")\n\n    def create_stack(self):\n        stack_name = self._get_param('StackName')\n        stack_body = self._get_param('TemplateBody')\n        template_url = self._get_param('TemplateURL')\n        parameters_list = self._get_list_prefix(\"Parameters.member\")\n        tags = dict((item['key'], item['value']) for item in self._get_list_prefix(\"Tags.member\"))\n\n        # Hack dict-comprehension\n        parameters = dict([\n            (parameter['parameter_key'], parameter['parameter_value'])\n            for parameter\n            in parameters_list\n        ])\n        if template_url:\n            stack_body = self._get_stack_from_s3_url(template_url)\n        stack_notification_arns = self._get_multi_param('NotificationARNs.member')\n\n        stack = self.cloudformation_backend.create_stack(\n            name=stack_name,\n            template=stack_body,\n            parameters=parameters,\n            region_name=self.region,\n            notification_arns=stack_notification_arns,\n            tags=tags,\n        )\n        stack_body = {\n            'CreateStackResponse': {\n                'CreateStackResult': {\n                    'StackId': stack.stack_id,\n                }\n            }\n        }\n        return json.dumps(stack_body)\n\n    def describe_stacks(self):\n        stack_name_or_id = None\n        if self._get_param('StackName'):\n            stack_name_or_id = self.querystring.get('StackName')[0]\n        stacks = self.cloudformation_backend.describe_stacks(stack_name_or_id)\n\n        template = self.response_template(DESCRIBE_STACKS_TEMPLATE)\n        return template.render(stacks=stacks)\n\n    def describe_stack_resources(self):\n        stack_name = self._get_param('StackName')\n        stack = self.cloudformation_backend.get_stack(stack_name)\n\n        template = self.response_template(DESCRIBE_STACKS_RESOURCES_RESPONSE)\n        return template.render(stack=stack)\n\n    def list_stacks(self):\n        stacks = self.cloudformation_backend.list_stacks()\n        template = self.response_template(LIST_STACKS_RESPONSE)\n        return template.render(stacks=stacks)\n\n    def list_stack_resources(self):\n        stack_name_or_id = self._get_param('StackName')\n        resources = self.cloudformation_backend.list_stack_resources(stack_name_or_id)\n\n        template = self.response_template(LIST_STACKS_RESOURCES_RESPONSE)\n        return template.render(resources=resources)\n\n    def get_template(self):\n        name_or_stack_id = self.querystring.get('StackName')[0]\n        stack = self.cloudformation_backend.get_stack(name_or_stack_id)\n\n        response = {\n            \"GetTemplateResponse\": {\n            \"GetTemplateResult\": {\n                \"TemplateBody\": stack.template,\n                \"ResponseMetadata\": {\n                    \"RequestId\": \"2d06e36c-ac1d-11e0-a958-f9382b6eb86bEXAMPLE\"\n                }\n            }\n          }\n        }\n        return json.dumps(response)\n\n    def update_stack(self):\n        stack_name = self._get_param('StackName')\n        stack_body = self._get_param('TemplateBody')\n\n        stack = self.cloudformation_backend.update_stack(\n            name=stack_name,\n            template=stack_body,\n        )\n        stack_body = {\n            'UpdateStackResponse': {\n                'UpdateStackResult': {\n                    'StackId': stack.name,\n                }\n            }\n        }\n        return json.dumps(stack_body)\n\n    def delete_stack(self):\n        name_or_stack_id = self.querystring.get('StackName')[0]\n\n        self.cloudformation_backend.delete_stack(name_or_stack_id)\n        return json.dumps({\n            'DeleteStackResponse': {\n                'DeleteStackResult': {},\n            }\n        })\n\n\nDESCRIBE_STACKS_TEMPLATE = \"\"\"<DescribeStacksResult>\n  <Stacks>\n    {% for stack in stacks %}\n    <member>\n      <StackName>{{ stack.name }}</StackName>\n      <StackId>{{ stack.stack_id }}</StackId>\n      <CreationTime>2010-07-27T22:28:28Z</CreationTime>\n      <StackStatus>{{ stack.status }}</StackStatus>\n      {% if stack.notification_arns %}\n      <NotificationARNs>\n        {% for notification_arn in stack.notification_arns %}\n        <member>{{ notification_arn }}</member>\n        {% endfor %}\n      </NotificationARNs>\n      {% else %}\n      <NotificationARNs/>\n      {% endif %}\n      <DisableRollback>false</DisableRollback>\n      <Outputs>\n      {% for output in stack.stack_outputs %}\n        <member>\n          <OutputKey>{{ output.key }}</OutputKey>\n          <OutputValue>{{ output.value }}</OutputValue>\n        </member>\n      {% endfor %}\n      </Outputs>\n      <Parameters>\n      {% for param_name, param_value in stack.stack_parameters.items() %}\n        <member>\n          <ParameterKey>{{ param_name }}</ParameterKey>\n          <ParameterValue>{{ param_value }}</ParameterValue>\n        </member>\n      {% endfor %}\n      </Parameters>\n      <Tags>\n        {% for tag_key, tag_value in stack.tags.items() %}\n          <member>\n            <Key>{{ tag_key }}</Key>\n            <Value>{{ tag_value }}</Value>\n          </member>\n        {% endfor %}\n      </Tags>\n    </member>\n    {% endfor %}\n  </Stacks>\n</DescribeStacksResult>\"\"\"\n\n\nLIST_STACKS_RESPONSE = \"\"\"<ListStacksResponse>\n <ListStacksResult>\n  <StackSummaries>\n    {% for stack in stacks %}\n    <member>\n        <StackId>{{ stack.stack_id }}</StackId>\n        <StackStatus>{{ stack.status }}</StackStatus>\n        <StackName>{{ stack.name }}</StackName>\n        <CreationTime>2011-05-23T15:47:44Z</CreationTime>\n        <TemplateDescription>{{ stack.description }}</TemplateDescription>\n    </member>\n    {% endfor %}\n  </StackSummaries>\n </ListStacksResult>\n</ListStacksResponse>\"\"\"\n\n\nDESCRIBE_STACKS_RESOURCES_RESPONSE = \"\"\"<DescribeStackResourcesResult>\n  <StackResources>\n    {% for resource in stack.stack_resources %}\n    <member>\n      <StackId>{{ stack.stack_id }}</StackId>\n      <StackName>{{ stack.name }}</StackName>\n      <LogicalResourceId>{{ resource.logical_resource_id }}</LogicalResourceId>\n      <PhysicalResourceId>{{ resource.physical_resource_id }}</PhysicalResourceId>\n      <ResourceType>{{ resource.type }}</ResourceType>\n      <Timestamp>2010-07-27T22:27:28Z</Timestamp>\n      <ResourceStatus>{{ stack.status }}</ResourceStatus>\n    </member>\n    {% endfor %}\n  </StackResources>\n</DescribeStackResourcesResult>\"\"\"\n\n\nLIST_STACKS_RESOURCES_RESPONSE = \"\"\"<ListStackResourcesResponse>\n  <ListStackResourcesResult>\n    <StackResourceSummaries>\n      {% for resource in resources %}\n      <member>\n        <ResourceStatus>CREATE_COMPLETE</ResourceStatus>\n        <LogicalResourceId>{{ resource.logical_resource_id }}</LogicalResourceId>\n        <LastUpdatedTimestamp>2011-06-21T20:15:58Z</LastUpdatedTimestamp>\n        <PhysicalResourceId>{{ resource.physical_resource_id }}</PhysicalResourceId>\n        <ResourceType>{{ resource.type }}</ResourceType>\n      </member>\n      {% endfor %}\n    </StackResourceSummaries>\n  </ListStackResourcesResult>\n  <ResponseMetadata>\n    <RequestId>2d06e36c-ac1d-11e0-a958-f9382b6eb86b</RequestId>\n  </ResponseMetadata>\n</ListStackResourcesResponse>\"\"\"\n", "path": "moto/cloudformation/responses.py"}]}