| 
									
										
										
										
											2018-12-21 12:28:56 +01:00
										 |  |  | import boto3 | 
					
						
							|  |  |  | from moto import mock_ec2 | 
					
						
							| 
									
										
										
										
											2022-03-11 20:28:45 -01:00
										 |  |  | import sure  # noqa # pylint: disable=unused-import | 
					
						
							| 
									
										
										
										
											2018-12-21 12:28:56 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @mock_ec2 | 
					
						
							|  |  |  | def test_describe_account_attributes(): | 
					
						
							| 
									
										
										
										
											2019-12-23 08:38:53 +01:00
										 |  |  |     conn = boto3.client("ec2", region_name="us-east-1") | 
					
						
							| 
									
										
										
										
											2018-12-21 12:28:56 +01:00
										 |  |  |     response = conn.describe_account_attributes() | 
					
						
							| 
									
										
										
										
											2019-12-23 08:38:53 +01:00
										 |  |  |     expected_attribute_values = [ | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             "AttributeValues": [{"AttributeValue": "5"}], | 
					
						
							|  |  |  |             "AttributeName": "vpc-max-security-groups-per-interface", | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             "AttributeValues": [{"AttributeValue": "20"}], | 
					
						
							|  |  |  |             "AttributeName": "max-instances", | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             "AttributeValues": [{"AttributeValue": "EC2"}, {"AttributeValue": "VPC"}], | 
					
						
							|  |  |  |             "AttributeName": "supported-platforms", | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             "AttributeValues": [{"AttributeValue": "none"}], | 
					
						
							|  |  |  |             "AttributeName": "default-vpc", | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             "AttributeValues": [{"AttributeValue": "5"}], | 
					
						
							|  |  |  |             "AttributeName": "max-elastic-ips", | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |         { | 
					
						
							|  |  |  |             "AttributeValues": [{"AttributeValue": "5"}], | 
					
						
							|  |  |  |             "AttributeName": "vpc-max-elastic-ips", | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |     ] | 
					
						
							|  |  |  |     response["AccountAttributes"].should.equal(expected_attribute_values) |