| 
									
										
										
										
											2017-11-10 18:44:02 +09:00
										 |  |  | from __future__ import unicode_literals | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import sure  # noqa | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import moto.server as server | 
					
						
							|  |  |  | from moto import mock_iotdata | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-31 08:44:26 -07:00
										 |  |  | """
 | 
					
						
							| 
									
										
										
										
											2017-11-10 18:44:02 +09:00
										 |  |  | Test the different server responses | 
					
						
							| 
									
										
										
										
											2019-10-31 08:44:26 -07:00
										 |  |  | """
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-10 18:44:02 +09:00
										 |  |  | 
 | 
					
						
							|  |  |  | @mock_iotdata | 
					
						
							|  |  |  | def test_iotdata_list(): | 
					
						
							|  |  |  |     backend = server.create_backend_app("iot-data") | 
					
						
							|  |  |  |     test_client = backend.test_client() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     # just making sure that server is up | 
					
						
							| 
									
										
										
										
											2019-10-31 08:44:26 -07:00
										 |  |  |     thing_name = "nothing" | 
					
						
							|  |  |  |     res = test_client.get("/things/{}/shadow".format(thing_name)) | 
					
						
							| 
									
										
										
										
											2017-11-10 18:44:02 +09:00
										 |  |  |     res.status_code.should.equal(404) |