Exemplo n.º 1
0
    def test_download_all_chunks(self):
        responses_add_dem_mocks()
        ws_dir, tgt_path = self.prepare_single_file_download()

        with open(tgt_path, 'wb') as tgt:
            rd.download(tgt, ws_dir, expect_res=(20,10))

        self.check_single_file_download(24, tgt_path, ws_dir)
Exemplo n.º 2
0
    def test_download_two_chunks(self):
        self.responses_add_mocks()
        ws_dir, tgt_path = self.prepare_single_file_download()

        with open(tgt_path, 'wb') as tgt:
            rd.download(tgt, ws_dir, chunks=('A', 'X'), expect_res=(8,8))

        self.check_single_file_download(2, tgt_path, ws_dir)
Exemplo n.º 3
0
    def download_all_chunks_separately(self, prefix=None, expect_prefix='15-',
            expect_suffix='.tif'):
        ws_dir, chunk_dir = self.prepare_multiple_chunk_download()

        # Kick off download
        rd.download(None, ws_dir, expect_res=(20,10),
                chunk_directory=chunk_dir, chunk_prefix=prefix)

        self.check_multiple_chunk_download(24, ws_dir, chunk_dir, expect_prefix, expect_suffix)