@@ -94,21 +94,22 @@ def test_download_incorrect(self):
9494 @mock .patch ('landsat.landsat.Downloader.download' )
9595 def test_download_process_continuous (self , mock_downloader , mock_process ):
9696 """Test download and process commands together"""
97- mock_downloader .return_value = True
97+ mock_downloader .return_value = {'LC80010092015051LGN00' : 'aws' ,
98+ 'LC80010092014051LGN00' : 'aws' }
9899 mock_process .return_value = 'image.TIF'
99100
100- args = ['download' , 'LC80010092015051LGN00' , '-b' , '432' , '-d' , self .mock_path , '-p' ]
101+ args = ['download' , 'LC80010092015051LGN00' , 'LC80010092014051LGN00' , ' -b' , '432' , '-d' , self .mock_path , '-p' ]
101102 output = landsat .main (self .parser .parse_args (args ))
102- mock_downloader .assert_called_with (['LC80010092015051LGN00' ], ['4' , '3' , '2' ])
103- mock_process .assert_called_with ('path/to/folder/LC80010092015051LGN00 ' , '432' , False , False )
104- self .assertEquals (output , ["The output is stored at image.TIF" ])
103+ mock_downloader .assert_called_with (['LC80010092015051LGN00' , 'LC80010092014051LGN00' ], ['4' , '3' , '2' ])
104+ mock_process .assert_called_with ('path/to/folder/LC80010092014051LGN00 ' , '432' , False , False )
105+ self .assertEquals (output , ["Image Processing Completed" , 0 ])
105106
106107 @mock .patch ('landsat.landsat.Uploader' )
107108 @mock .patch ('landsat.landsat.process_image' )
108109 @mock .patch ('landsat.landsat.Downloader.download' )
109110 def test_download_process_continuous_with_upload (self , mock_downloader , mock_process , mock_upload ):
110111 """Test download and process commands together"""
111- mock_downloader .return_value = True
112+ mock_downloader .return_value = { 'LC80010092015051LGN00' : 'aws' }
112113 mock_process .return_value = 'image.TIF'
113114 mock_upload .run .return_value = True
114115
@@ -119,13 +120,13 @@ def test_download_process_continuous_with_upload(self, mock_downloader, mock_pro
119120 mock_process .assert_called_with ('path/to/folder/LC80010092015051LGN00' , '432' , False , False )
120121 mock_upload .assert_called_with ('somekey' , 'somesecret' , 'this' )
121122 mock_upload .return_value .run .assert_called_with ('mybucket' , 'image.TIF' , 'image.TIF' )
122- self .assertEquals (output , ["The output is stored at image.TIF" ])
123+ self .assertEquals (output , ["Image Processing Completed" , 0 ])
123124
124125 @mock .patch ('landsat.landsat.process_image' )
125126 @mock .patch ('landsat.landsat.Downloader.download' )
126127 def test_download_process_continuous_with_wrong_args (self , mock_downloader , mock_process ):
127128 """Test download and process commands together"""
128- mock_downloader .return_value = True
129+ mock_downloader .return_value = { 'LC80010092015051LGN00' : 'aws' }
129130 mock_process .return_value = 'image.TIF'
130131
131132 args = ['download' , 'LC80010092015051LGN00' , '-b' , '432' , '-d' , self .mock_path , '-p' ,
0 commit comments