We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Routes: Uncomment VPC Peering Connection test dependent on Boto > 2.32.1
One of the tests for routes is for a route to VPC Peering Connection, which will be supported in Boto 2.32.2, though that version is not yet packaged and released.

Once a new https://github.com/boto/boto version is released, then `test_routes_vpc_peering_connection` in `tests/test_ec2/test_route_tables.py` should be uncommented, the `@requires_boto_gte("2.32.2")` version number should be confirmed (in case Boto releases as "2.33.0" instead, for instance) and `.travis.yml` should be updated with the new Boto version as well.

It probably makes sense to simply change `BOTO_VERSION=2.32.1` to the new version number, rather than adding a new BOTO_VERSION entry, since this version is already the "VPC peering connection" version.


--- 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/ec2/responses/route_tables.py`
Content:
```
1 from __future__ import unicode_literals
2 from jinja2 import Template
3 
4 from moto.core.responses import BaseResponse
5 from moto.ec2.models import ec2_backend
6 from moto.ec2.utils import route_table_ids_from_querystring, filters_from_querystring, optional_from_querystring
7 
8 
9 class RouteTables(BaseResponse):
10     def associate_route_table(self):
11         route_table_id = self.querystring.get('RouteTableId')[0]
12         subnet_id = self.querystring.get('SubnetId')[0]
13         association_id = ec2_backend.associate_route_table(route_table_id, subnet_id)
14         template = Template(ASSOCIATE_ROUTE_TABLE_RESPONSE)
15         return template.render(association_id=association_id)
16 
17     def create_route(self):
18         route_table_id = self.querystring.get('RouteTableId')[0]
19         destination_cidr_block = self.querystring.get('DestinationCidrBlock')[0]
20 
21         internet_gateway_id = optional_from_querystring('GatewayId', self.querystring)
22         instance_id = optional_from_querystring('InstanceId', self.querystring)
23         interface_id = optional_from_querystring('NetworkInterfaceId', self.querystring)
24         pcx_id = optional_from_querystring('VpcPeeringConnectionId', self.querystring)
25 
26         route = ec2_backend.create_route(route_table_id, destination_cidr_block,
27                                          gateway_id=internet_gateway_id,
28                                          instance_id=instance_id,
29                                          interface_id=interface_id,
30                                          vpc_peering_connection_id=pcx_id)
31 
32         template = Template(CREATE_ROUTE_RESPONSE)
33         return template.render()
34 
35     def create_route_table(self):
36         vpc_id = self.querystring.get('VpcId')[0]
37         route_table = ec2_backend.create_route_table(vpc_id)
38         template = Template(CREATE_ROUTE_TABLE_RESPONSE)
39         return template.render(route_table=route_table)
40 
41     def delete_route(self):
42         route_table_id = self.querystring.get('RouteTableId')[0]
43         destination_cidr_block = self.querystring.get('DestinationCidrBlock')[0]
44         ec2_backend.delete_route(route_table_id, destination_cidr_block)
45         template = Template(DELETE_ROUTE_RESPONSE)
46         return template.render()
47 
48     def delete_route_table(self):
49         route_table_id = self.querystring.get('RouteTableId')[0]
50         ec2_backend.delete_route_table(route_table_id)
51         template = Template(DELETE_ROUTE_TABLE_RESPONSE)
52         return template.render()
53 
54     def describe_route_tables(self):
55         route_table_ids = route_table_ids_from_querystring(self.querystring)
56         filters = filters_from_querystring(self.querystring)
57         route_tables = ec2_backend.get_all_route_tables(route_table_ids, filters)
58         template = Template(DESCRIBE_ROUTE_TABLES_RESPONSE)
59         return template.render(route_tables=route_tables)
60 
61     def disassociate_route_table(self):
62         association_id = self.querystring.get('AssociationId')[0]
63         ec2_backend.disassociate_route_table(association_id)
64         template = Template(DISASSOCIATE_ROUTE_TABLE_RESPONSE)
65         return template.render()
66 
67     def replace_route(self):
68         route_table_id = self.querystring.get('RouteTableId')[0]
69         destination_cidr_block = self.querystring.get('DestinationCidrBlock')[0]
70 
71         internet_gateway_id = optional_from_querystring('GatewayId', self.querystring)
72         instance_id = optional_from_querystring('InstanceId', self.querystring)
73         interface_id = optional_from_querystring('NetworkInterfaceId', self.querystring)
74         pcx_id = optional_from_querystring('VpcPeeringConnectionId', self.querystring)
75 
76         route = ec2_backend.replace_route(route_table_id, destination_cidr_block,
77                                           gateway_id=internet_gateway_id,
78                                           instance_id=instance_id,
79                                           interface_id=interface_id,
80                                           vpc_peering_connection_id=pcx_id)
81 
82         template = Template(REPLACE_ROUTE_RESPONSE)
83         return template.render()
84 
85     def replace_route_table_association(self):
86         route_table_id = self.querystring.get('RouteTableId')[0]
87         association_id = self.querystring.get('AssociationId')[0]
88         new_association_id = ec2_backend.replace_route_table_association(association_id, route_table_id)
89         template = Template(REPLACE_ROUTE_TABLE_ASSOCIATION_RESPONSE)
90         return template.render(association_id=new_association_id)
91 
92 
93 CREATE_ROUTE_RESPONSE = """
94 <CreateRouteResponse xmlns="http://ec2.amazonaws.com/doc/2013-07-15/">
95    <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
96    <return>true</return>
97 </CreateRouteResponse>
98 """
99 
100 REPLACE_ROUTE_RESPONSE = """
101 <ReplaceRouteResponse xmlns="http://ec2.amazonaws.com/doc/2013-07-15/">
102    <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
103    <return>true</return>
104 </ReplaceRouteResponse>
105 """
106 
107 CREATE_ROUTE_TABLE_RESPONSE = """
108 <CreateRouteTableResponse xmlns="http://ec2.amazonaws.com/doc/2013-07-15/">
109    <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
110    <routeTable>
111       <routeTableId>{{ route_table.id }}</routeTableId>
112       <vpcId>{{ route_table.vpc_id }}</vpcId>
113       <routeSet>
114          {% for route in route_table.routes.values() %}
115            {% if route.local %}
116            <item>
117              <destinationCidrBlock>{{ route.destination_cidr_block }}</destinationCidrBlock>
118              <gatewayId>local</gatewayId>
119              <state>active</state>
120            </item>
121            {% endif %}
122          {% endfor %}
123       </routeSet>
124       <associationSet/>
125       <tagSet/>
126    </routeTable>
127 </CreateRouteTableResponse>
128 """
129 
130 DESCRIBE_ROUTE_TABLES_RESPONSE = """
131 <DescribeRouteTablesResponse xmlns="http://ec2.amazonaws.com/doc/2013-08-15/">
132    <requestId>6f570b0b-9c18-4b07-bdec-73740dcf861a</requestId>
133    <routeTableSet>
134      {% for route_table in route_tables %}
135        <item>
136           <routeTableId>{{ route_table.id }}</routeTableId>
137           <vpcId>{{ route_table.vpc_id }}</vpcId>
138           <routeSet>
139             {% for route in route_table.routes.values() %}
140               <item>
141                 <destinationCidrBlock>{{ route.destination_cidr_block }}</destinationCidrBlock>
142                 {% if route.local %}
143                   <gatewayId>local</gatewayId>
144                   <origin>CreateRouteTable</origin>
145                   <state>active</state>
146                 {% endif %}
147                 {% if route.internet_gateway %}
148                   <gatewayId>{{ route.internet_gateway.id }}</gatewayId>
149                   <origin>CreateRoute</origin>
150                   <state>active</state>
151                 {% endif %}
152                 {% if route.instance %}
153                   <instanceId>{{ route.instance.id }}</instanceId>
154                   <origin>CreateRoute</origin>
155                   <state>active</state>
156                 {% endif %}
157                 {% if route.vpc_pcx %}
158                   <origin>CreateRoute</origin>
159                   <state>blackhole</state>
160                 {% endif %}
161               </item>
162             {% endfor %}
163           </routeSet>
164           <associationSet>
165             {% for association_id,subnet_id in route_table.associations.items() %}
166               <item>
167                 <routeTableAssociationId>{{ association_id }}</routeTableAssociationId>
168                 <routeTableId>{{ route_table.id }}</routeTableId>
169                 <main>false</main>
170                 <subnetId>{{ subnet_id }}</subnetId>
171               </item>
172             {% endfor %}
173           </associationSet>
174          <tagSet/>
175        </item>
176      {% endfor %}
177    </routeTableSet>
178 </DescribeRouteTablesResponse>
179 """
180 
181 DELETE_ROUTE_RESPONSE = """
182 <DeleteRouteResponse xmlns="http://ec2.amazonaws.com/doc/2013-07-15/">
183    <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
184    <return>true</return>
185 </DeleteRouteResponse>
186 """
187 
188 DELETE_ROUTE_TABLE_RESPONSE = """
189 <DeleteRouteTableResponse xmlns="http://ec2.amazonaws.com/doc/2013-07-15/">
190    <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
191    <return>true</return>
192 </DeleteRouteTableResponse>
193 """
194 
195 ASSOCIATE_ROUTE_TABLE_RESPONSE = """
196 <AssociateRouteTableResponse xmlns="http://ec2.amazonaws.com/doc/2014-06-15/">
197    <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
198    <associationId>{{ association_id }}</associationId>
199 </AssociateRouteTableResponse>
200 """
201 
202 DISASSOCIATE_ROUTE_TABLE_RESPONSE = """
203 <DisassociateRouteTableResponse xmlns="http://ec2.amazonaws.com/doc/2014-06-15/">
204    <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
205    <return>true</return>
206 </DisassociateRouteTableResponse>
207 """
208 
209 REPLACE_ROUTE_TABLE_ASSOCIATION_RESPONSE = """
210 <ReplaceRouteTableAssociationResponse xmlns="http://ec2.amazonaws.com/doc/2014-06-15/">
211    <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
212    <newAssociationId>{{ association_id }}</newAssociationId>
213 </ReplaceRouteTableAssociationResponse>
214 """
215
```
--- 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/ec2/responses/route_tables.py b/moto/ec2/responses/route_tables.py
--- a/moto/ec2/responses/route_tables.py
+++ b/moto/ec2/responses/route_tables.py
@@ -144,6 +144,7 @@
                   <state>active</state>
                 {% endif %}
                 {% if route.vpc_pcx %}
+                  <vpcPeeringConnectionId>{{ route.vpc_pcx.id }}</vpcPeeringConnectionId>
                   <origin>CreateRoute</origin>
                   <state>blackhole</state>
                 {% endif %}

{"golden_diff": "diff --git a/moto/ec2/responses/route_tables.py b/moto/ec2/responses/route_tables.py\n--- a/moto/ec2/responses/route_tables.py\n+++ b/moto/ec2/responses/route_tables.py\n@@ -144,6 +144,7 @@\n                   <state>active</state>\n                 {% endif %}\n                 {% if route.vpc_pcx %}\n+                  <vpcPeeringConnectionId>{{ route.vpc_pcx.id }}</vpcPeeringConnectionId>\n                   <origin>CreateRoute</origin>\n                   <state>blackhole</state>\n                 {% endif %}\n", "issue": "Routes: Uncomment VPC Peering Connection test dependent on Boto > 2.32.1\nOne of the tests for routes is for a route to VPC Peering Connection, which will be supported in Boto 2.32.2, though that version is not yet packaged and released.\n\nOnce a new https://github.com/boto/boto version is released, then `test_routes_vpc_peering_connection` in `tests/test_ec2/test_route_tables.py` should be uncommented, the `@requires_boto_gte(\"2.32.2\")` version number should be confirmed (in case Boto releases as \"2.33.0\" instead, for instance) and `.travis.yml` should be updated with the new Boto version as well.\n\nIt probably makes sense to simply change `BOTO_VERSION=2.32.1` to the new version number, rather than adding a new BOTO_VERSION entry, since this version is already the \"VPC peering connection\" version.\n\n", "before_files": [{"content": "from __future__ import unicode_literals\nfrom jinja2 import Template\n\nfrom moto.core.responses import BaseResponse\nfrom moto.ec2.models import ec2_backend\nfrom moto.ec2.utils import route_table_ids_from_querystring, filters_from_querystring, optional_from_querystring\n\n\nclass RouteTables(BaseResponse):\n    def associate_route_table(self):\n        route_table_id = self.querystring.get('RouteTableId')[0]\n        subnet_id = self.querystring.get('SubnetId')[0]\n        association_id = ec2_backend.associate_route_table(route_table_id, subnet_id)\n        template = Template(ASSOCIATE_ROUTE_TABLE_RESPONSE)\n        return template.render(association_id=association_id)\n\n    def create_route(self):\n        route_table_id = self.querystring.get('RouteTableId')[0]\n        destination_cidr_block = self.querystring.get('DestinationCidrBlock')[0]\n\n        internet_gateway_id = optional_from_querystring('GatewayId', self.querystring)\n        instance_id = optional_from_querystring('InstanceId', self.querystring)\n        interface_id = optional_from_querystring('NetworkInterfaceId', self.querystring)\n        pcx_id = optional_from_querystring('VpcPeeringConnectionId', self.querystring)\n\n        route = ec2_backend.create_route(route_table_id, destination_cidr_block,\n                                         gateway_id=internet_gateway_id,\n                                         instance_id=instance_id,\n                                         interface_id=interface_id,\n                                         vpc_peering_connection_id=pcx_id)\n\n        template = Template(CREATE_ROUTE_RESPONSE)\n        return template.render()\n\n    def create_route_table(self):\n        vpc_id = self.querystring.get('VpcId')[0]\n        route_table = ec2_backend.create_route_table(vpc_id)\n        template = Template(CREATE_ROUTE_TABLE_RESPONSE)\n        return template.render(route_table=route_table)\n\n    def delete_route(self):\n        route_table_id = self.querystring.get('RouteTableId')[0]\n        destination_cidr_block = self.querystring.get('DestinationCidrBlock')[0]\n        ec2_backend.delete_route(route_table_id, destination_cidr_block)\n        template = Template(DELETE_ROUTE_RESPONSE)\n        return template.render()\n\n    def delete_route_table(self):\n        route_table_id = self.querystring.get('RouteTableId')[0]\n        ec2_backend.delete_route_table(route_table_id)\n        template = Template(DELETE_ROUTE_TABLE_RESPONSE)\n        return template.render()\n\n    def describe_route_tables(self):\n        route_table_ids = route_table_ids_from_querystring(self.querystring)\n        filters = filters_from_querystring(self.querystring)\n        route_tables = ec2_backend.get_all_route_tables(route_table_ids, filters)\n        template = Template(DESCRIBE_ROUTE_TABLES_RESPONSE)\n        return template.render(route_tables=route_tables)\n\n    def disassociate_route_table(self):\n        association_id = self.querystring.get('AssociationId')[0]\n        ec2_backend.disassociate_route_table(association_id)\n        template = Template(DISASSOCIATE_ROUTE_TABLE_RESPONSE)\n        return template.render()\n\n    def replace_route(self):\n        route_table_id = self.querystring.get('RouteTableId')[0]\n        destination_cidr_block = self.querystring.get('DestinationCidrBlock')[0]\n\n        internet_gateway_id = optional_from_querystring('GatewayId', self.querystring)\n        instance_id = optional_from_querystring('InstanceId', self.querystring)\n        interface_id = optional_from_querystring('NetworkInterfaceId', self.querystring)\n        pcx_id = optional_from_querystring('VpcPeeringConnectionId', self.querystring)\n\n        route = ec2_backend.replace_route(route_table_id, destination_cidr_block,\n                                          gateway_id=internet_gateway_id,\n                                          instance_id=instance_id,\n                                          interface_id=interface_id,\n                                          vpc_peering_connection_id=pcx_id)\n\n        template = Template(REPLACE_ROUTE_RESPONSE)\n        return template.render()\n\n    def replace_route_table_association(self):\n        route_table_id = self.querystring.get('RouteTableId')[0]\n        association_id = self.querystring.get('AssociationId')[0]\n        new_association_id = ec2_backend.replace_route_table_association(association_id, route_table_id)\n        template = Template(REPLACE_ROUTE_TABLE_ASSOCIATION_RESPONSE)\n        return template.render(association_id=new_association_id)\n\n\nCREATE_ROUTE_RESPONSE = \"\"\"\n<CreateRouteResponse xmlns=\"http://ec2.amazonaws.com/doc/2013-07-15/\">\n   <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>\n   <return>true</return>\n</CreateRouteResponse>\n\"\"\"\n\nREPLACE_ROUTE_RESPONSE = \"\"\"\n<ReplaceRouteResponse xmlns=\"http://ec2.amazonaws.com/doc/2013-07-15/\">\n   <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>\n   <return>true</return>\n</ReplaceRouteResponse>\n\"\"\"\n\nCREATE_ROUTE_TABLE_RESPONSE = \"\"\"\n<CreateRouteTableResponse xmlns=\"http://ec2.amazonaws.com/doc/2013-07-15/\">\n   <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>\n   <routeTable>\n      <routeTableId>{{ route_table.id }}</routeTableId>\n      <vpcId>{{ route_table.vpc_id }}</vpcId>\n      <routeSet>\n         {% for route in route_table.routes.values() %}\n           {% if route.local %}\n           <item>\n             <destinationCidrBlock>{{ route.destination_cidr_block }}</destinationCidrBlock>\n             <gatewayId>local</gatewayId>\n             <state>active</state>\n           </item>\n           {% endif %}\n         {% endfor %}\n      </routeSet>\n      <associationSet/>\n      <tagSet/>\n   </routeTable>\n</CreateRouteTableResponse>\n\"\"\"\n\nDESCRIBE_ROUTE_TABLES_RESPONSE = \"\"\"\n<DescribeRouteTablesResponse xmlns=\"http://ec2.amazonaws.com/doc/2013-08-15/\">\n   <requestId>6f570b0b-9c18-4b07-bdec-73740dcf861a</requestId>\n   <routeTableSet>\n     {% for route_table in route_tables %}\n       <item>\n          <routeTableId>{{ route_table.id }}</routeTableId>\n          <vpcId>{{ route_table.vpc_id }}</vpcId>\n          <routeSet>\n            {% for route in route_table.routes.values() %}\n              <item>\n                <destinationCidrBlock>{{ route.destination_cidr_block }}</destinationCidrBlock>\n                {% if route.local %}\n                  <gatewayId>local</gatewayId>\n                  <origin>CreateRouteTable</origin>\n                  <state>active</state>\n                {% endif %}\n                {% if route.internet_gateway %}\n                  <gatewayId>{{ route.internet_gateway.id }}</gatewayId>\n                  <origin>CreateRoute</origin>\n                  <state>active</state>\n                {% endif %}\n                {% if route.instance %}\n                  <instanceId>{{ route.instance.id }}</instanceId>\n                  <origin>CreateRoute</origin>\n                  <state>active</state>\n                {% endif %}\n                {% if route.vpc_pcx %}\n                  <origin>CreateRoute</origin>\n                  <state>blackhole</state>\n                {% endif %}\n              </item>\n            {% endfor %}\n          </routeSet>\n          <associationSet>\n            {% for association_id,subnet_id in route_table.associations.items() %}\n              <item>\n                <routeTableAssociationId>{{ association_id }}</routeTableAssociationId>\n                <routeTableId>{{ route_table.id }}</routeTableId>\n                <main>false</main>\n                <subnetId>{{ subnet_id }}</subnetId>\n              </item>\n            {% endfor %}\n          </associationSet>\n         <tagSet/>\n       </item>\n     {% endfor %}\n   </routeTableSet>\n</DescribeRouteTablesResponse>\n\"\"\"\n\nDELETE_ROUTE_RESPONSE = \"\"\"\n<DeleteRouteResponse xmlns=\"http://ec2.amazonaws.com/doc/2013-07-15/\">\n   <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>\n   <return>true</return>\n</DeleteRouteResponse>\n\"\"\"\n\nDELETE_ROUTE_TABLE_RESPONSE = \"\"\"\n<DeleteRouteTableResponse xmlns=\"http://ec2.amazonaws.com/doc/2013-07-15/\">\n   <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>\n   <return>true</return>\n</DeleteRouteTableResponse>\n\"\"\"\n\nASSOCIATE_ROUTE_TABLE_RESPONSE = \"\"\"\n<AssociateRouteTableResponse xmlns=\"http://ec2.amazonaws.com/doc/2014-06-15/\">\n   <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>\n   <associationId>{{ association_id }}</associationId>\n</AssociateRouteTableResponse>\n\"\"\"\n\nDISASSOCIATE_ROUTE_TABLE_RESPONSE = \"\"\"\n<DisassociateRouteTableResponse xmlns=\"http://ec2.amazonaws.com/doc/2014-06-15/\">\n   <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>\n   <return>true</return>\n</DisassociateRouteTableResponse>\n\"\"\"\n\nREPLACE_ROUTE_TABLE_ASSOCIATION_RESPONSE = \"\"\"\n<ReplaceRouteTableAssociationResponse xmlns=\"http://ec2.amazonaws.com/doc/2014-06-15/\">\n   <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>\n   <newAssociationId>{{ association_id }}</newAssociationId>\n</ReplaceRouteTableAssociationResponse>\n\"\"\"\n", "path": "moto/ec2/responses/route_tables.py"}], "after_files": [{"content": "from __future__ import unicode_literals\nfrom jinja2 import Template\n\nfrom moto.core.responses import BaseResponse\nfrom moto.ec2.models import ec2_backend\nfrom moto.ec2.utils import route_table_ids_from_querystring, filters_from_querystring, optional_from_querystring\n\n\nclass RouteTables(BaseResponse):\n    def associate_route_table(self):\n        raise NotImplementedError('RouteTables(AmazonVPC).associate_route_table is not yet implemented')\n\n    def create_route(self):\n        route_table_id = self.querystring.get('RouteTableId')[0]\n        destination_cidr_block = self.querystring.get('DestinationCidrBlock')[0]\n\n        internet_gateway_id = optional_from_querystring('GatewayId', self.querystring)\n        instance_id = optional_from_querystring('InstanceId', self.querystring)\n        interface_id = optional_from_querystring('NetworkInterfaceId', self.querystring)\n        pcx_id = optional_from_querystring('VpcPeeringConnectionId', self.querystring)\n\n        route = ec2_backend.create_route(route_table_id, destination_cidr_block,\n                                         gateway_id=internet_gateway_id,\n                                         instance_id=instance_id,\n                                         interface_id=interface_id,\n                                         vpc_peering_connection_id=pcx_id)\n\n        template = Template(CREATE_ROUTE_RESPONSE)\n        return template.render()\n\n    def create_route_table(self):\n        vpc_id = self.querystring.get('VpcId')[0]\n        route_table = ec2_backend.create_route_table(vpc_id)\n        template = Template(CREATE_ROUTE_TABLE_RESPONSE)\n        return template.render(route_table=route_table)\n\n    def delete_route(self):\n        route_table_id = self.querystring.get('RouteTableId')[0]\n        destination_cidr_block = self.querystring.get('DestinationCidrBlock')[0]\n        ec2_backend.delete_route(route_table_id, destination_cidr_block)\n        template = Template(DELETE_ROUTE_RESPONSE)\n        return template.render()\n\n    def delete_route_table(self):\n        route_table_id = self.querystring.get('RouteTableId')[0]\n        ec2_backend.delete_route_table(route_table_id)\n        template = Template(DELETE_ROUTE_TABLE_RESPONSE)\n        return template.render()\n\n    def describe_route_tables(self):\n        route_table_ids = route_table_ids_from_querystring(self.querystring)\n        filters = filters_from_querystring(self.querystring)\n        route_tables = ec2_backend.get_all_route_tables(route_table_ids, filters)\n        template = Template(DESCRIBE_ROUTE_TABLES_RESPONSE)\n        return template.render(route_tables=route_tables)\n\n    def disassociate_route_table(self):\n        raise NotImplementedError('RouteTables(AmazonVPC).disassociate_route_table is not yet implemented')\n\n    def replace_route(self):\n        route_table_id = self.querystring.get('RouteTableId')[0]\n        destination_cidr_block = self.querystring.get('DestinationCidrBlock')[0]\n\n        internet_gateway_id = optional_from_querystring('GatewayId', self.querystring)\n        instance_id = optional_from_querystring('InstanceId', self.querystring)\n        interface_id = optional_from_querystring('NetworkInterfaceId', self.querystring)\n        pcx_id = optional_from_querystring('VpcPeeringConnectionId', self.querystring)\n\n        route = ec2_backend.replace_route(route_table_id, destination_cidr_block,\n                                          gateway_id=internet_gateway_id,\n                                          instance_id=instance_id,\n                                          interface_id=interface_id,\n                                          vpc_peering_connection_id=pcx_id)\n\n        template = Template(REPLACE_ROUTE_RESPONSE)\n        return template.render()\n\n    def replace_route_table_association(self):\n        raise NotImplementedError('RouteTables(AmazonVPC).replace_route_table_association is not yet implemented')\n\n\nCREATE_ROUTE_RESPONSE = \"\"\"\n<CreateRouteResponse xmlns=\"http://ec2.amazonaws.com/doc/2013-07-15/\">\n   <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>\n   <return>true</return>\n</CreateRouteResponse>\n\"\"\"\n\nREPLACE_ROUTE_RESPONSE = \"\"\"\n<ReplaceRouteResponse xmlns=\"http://ec2.amazonaws.com/doc/2013-07-15/\">\n   <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>\n   <return>true</return>\n</ReplaceRouteResponse>\n\"\"\"\n\nCREATE_ROUTE_TABLE_RESPONSE = \"\"\"\n<CreateRouteTableResponse xmlns=\"http://ec2.amazonaws.com/doc/2013-07-15/\">\n   <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>\n   <routeTable>\n      <routeTableId>{{ route_table.id }}</routeTableId>\n      <vpcId>{{ route_table.vpc_id }}</vpcId>\n      <routeSet>\n         {% for route in route_table.routes.values() %}\n           {% if route.local %}\n           <item>\n             <destinationCidrBlock>{{ route.destination_cidr_block }}</destinationCidrBlock>\n             <gatewayId>local</gatewayId>\n             <state>active</state>\n           </item>\n           {% endif %}\n         {% endfor %}\n      </routeSet>\n      <associationSet/>\n      <tagSet/>\n   </routeTable>\n</CreateRouteTableResponse>\n\"\"\"\n\nDESCRIBE_ROUTE_TABLES_RESPONSE = \"\"\"\n<DescribeRouteTablesResponse xmlns=\"http://ec2.amazonaws.com/doc/2013-08-15/\">\n   <requestId>6f570b0b-9c18-4b07-bdec-73740dcf861a</requestId>\n   <routeTableSet>\n     {% for route_table in route_tables %}\n       <item>\n          <routeTableId>{{ route_table.id }}</routeTableId>\n          <vpcId>{{ route_table.vpc_id }}</vpcId>\n          <routeSet>\n            {% for route in route_table.routes.values() %}\n              <item>\n                <destinationCidrBlock>{{ route.destination_cidr_block }}</destinationCidrBlock>\n                {% if route.local %}\n                  <gatewayId>local</gatewayId>\n                  <origin>CreateRouteTable</origin>\n                  <state>active</state>\n                {% endif %}\n                {% if route.internet_gateway %}\n                  <gatewayId>{{ route.internet_gateway.id }}</gatewayId>\n                  <origin>CreateRoute</origin>\n                  <state>active</state>\n                {% endif %}\n                {% if route.instance %}\n                  <instanceId>{{ route.instance.id }}</instanceId>\n                  <origin>CreateRoute</origin>\n                  <state>active</state>\n                {% endif %}\n                {% if route.vpc_pcx %}\n                  <vpcPeeringConnectionId>{{ route.vpc_pcx.id }}</vpcPeeringConnectionId>\n                  <origin>CreateRoute</origin>\n                  <state>blackhole</state>\n                {% endif %}\n              </item>\n            {% endfor %}\n          </routeSet>\n          <associationSet>\n            {% if route_table.association_id %}\n              <item>\n                  <routeTableAssociationId>{{ route_table.association_id }}</routeTableAssociationId>\n                  <routeTableId>{{ route_table.id }}</routeTableId>\n                {% if not route_table.subnet_id %}\n                  <main>true</main>\n                {% endif %}\n                {% if route_table.subnet_id %}\n                  <subnetId>{{ route_table.subnet_id }}</subnetId>\n                {% endif %}\n              </item>\n            {% endif %}\n          </associationSet>\n         <tagSet/>\n       </item>\n     {% endfor %}\n   </routeTableSet>\n</DescribeRouteTablesResponse>\n\"\"\"\n\nDELETE_ROUTE_RESPONSE = \"\"\"\n<DeleteRouteResponse xmlns=\"http://ec2.amazonaws.com/doc/2013-07-15/\">\n   <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>\n   <return>true</return>\n</DeleteRouteResponse>\n\"\"\"\n\nDELETE_ROUTE_TABLE_RESPONSE = \"\"\"\n<DeleteRouteTableResponse xmlns=\"http://ec2.amazonaws.com/doc/2013-07-15/\">\n   <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>\n   <return>true</return>\n</DeleteRouteTableResponse>\n\"\"\"\n", "path": "moto/ec2/responses/route_tables.py"}]}