| 
									
										
										
										
											2015-06-30 05:44:39 -04:00
										 |  |  | from __future__ import unicode_literals | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import json | 
					
						
							|  |  |  | import sure  # noqa | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import moto.server as server | 
					
						
							|  |  |  | from moto import mock_kms | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-31 08:44:26 -07:00
										 |  |  | """
 | 
					
						
							| 
									
										
										
										
											2015-06-30 05:44:39 -04:00
										 |  |  | Test the different server responses | 
					
						
							| 
									
										
										
										
											2019-10-31 08:44:26 -07:00
										 |  |  | """
 | 
					
						
							| 
									
										
										
										
											2015-06-30 05:44:39 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @mock_kms | 
					
						
							|  |  |  | def test_list_keys(): | 
					
						
							|  |  |  |     backend = server.create_backend_app("kms") | 
					
						
							|  |  |  |     test_client = backend.test_client() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-31 08:44:26 -07:00
										 |  |  |     res = test_client.get("/?Action=ListKeys") | 
					
						
							| 
									
										
										
										
											2015-06-30 05:44:39 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-31 08:44:26 -07:00
										 |  |  |     json.loads(res.data.decode("utf-8")).should.equal( | 
					
						
							|  |  |  |         {"Keys": [], "NextMarker": None, "Truncated": False} | 
					
						
							|  |  |  |     ) |