2021-11-29 13:35:43 -01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import xmltodict
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-06-29 20:12:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								from moto import mock_cloudfront
							 | 
						
					
						
							
								
									
										
										
										
											2021-11-29 13:35:43 -01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import moto.server as server
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-06-29 20:12:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								@mock_cloudfront
							 | 
						
					
						
							
								
									
										
										
										
											2021-11-29 13:35:43 -01:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								def test_cloudfront_list():
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    backend = server.create_backend_app("cloudfront")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    test_client = backend.test_client()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    res = test_client.get("/2020-05-31/distribution")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    data = xmltodict.parse(res.data, dict_constructor=dict)
							 | 
						
					
						
							
								
									
										
										
										
											2023-08-15 04:06:20 -04:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    assert "DistributionList" in data
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    assert "Items" not in data["DistributionList"]
							 |