Repository: CS-SI/eodag

Issue:
Impossible to download data with providers using api plugin in REST mode
In REST mode, when a provider does not get the download plugin, data download fails with the following error :
`AttributeError: 'ProviderConfig' object has no attribute 'download'`


Discussion:
github-actions[bot]: ## Test Results
       4 files  ±0         4 suites  ±0   4m 0s [:stopwatch:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v2.8.0/README.md#the-symbols "duration of all tests") -6s
   388 tests ±0     386 [:heavy_check_mark:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v2.8.0/README.md#the-symbols "passed tests") ±0    2 [:zzz:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v2.8.0/README.md#the-symbols "skipped / disabled tests") ±0  0 [:x:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v2.8.0/README.md#the-symbols "failed tests") ±0 
1 552 runs  ±0  1 496 [:heavy_check_mark:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v2.8.0/README.md#the-symbols "passed tests") ±0  56 [:zzz:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v2.8.0/README.md#the-symbols "skipped / disabled tests") ±0  0 [:x:](https://github.com/EnricoMi/publish-unit-test-result-action/blob/v2.8.0/README.md#the-symbols "failed tests") ±0 

Results for commit 45cae33d. ± Comparison against base commit 50d6e603.

[test-results]:data:application/gzip;base64,H4sIAB0Nm2QC/02MzQ6DIBAGX8Vw7qELC2JfxiA/CalKg3Bq+u4Fq9S9zXzZeRPnZ7uRR4e3jmzZpwYmR5V8WAtSvBdRplRHJuVJ45a13pX4q6d/1Z8mnPJzES0x2hhDPEzMa20C5/Sgswk4iKZ+Td7EpbnzNanDsvhUgCDXyjJmeqDUcGdAAR0Q5VQOJmWgRy6cBfL5AqpVr/cIAQAA

github-actions[bot]: <strong>Code Coverage (Ubuntu)</strong>

| File | Coverage |   |
| - | :-: | :-: |
| **All files** | `82%` | :white_check_mark: |

_Minimum allowed coverage is `70%`_

<p align="right">Generated by :monkey: cobertura-action against 45cae33d7122d5fd1a129448bbbb1bad17456fe1 </p>
github-actions[bot]: <strong>Code Coverage (Windows)</strong>

| File | Coverage |   |
| - | :-: | :-: |
| **All files** | `77%` | :white_check_mark: |

_Minimum allowed coverage is `70%`_

<p align="right">Generated by :monkey: cobertura-action against 45cae33d7122d5fd1a129448bbbb1bad17456fe1 </p>

Patch:
diff --git a/eodag/rest/utils.py b/eodag/rest/utils.py
index de5d168a..e9955275 100644
--- a/eodag/rest/utils.py
+++ b/eodag/rest/utils.py
@@ -589,8 +589,6 @@ def download_stac_item_by_id(catalogs, item_id, provider=None):
 
     product = search_product_by_id(item_id, product_type=catalogs[0])[0]
 
-    eodag_api.providers_config[product.provider].download.extract = False
-
     product_path = eodag_api.download(product, extract=False)
 
     if os.path.isdir(product_path):


Test patch:
diff --git a/tests/units/test_http_server.py b/tests/units/test_http_server.py
index 72f97057..f302ef06 100644
--- a/tests/units/test_http_server.py
+++ b/tests/units/test_http_server.py
@@ -627,7 +627,7 @@ class RequestTestCase(unittest.TestCase):
         "eodag.rest.utils.eodag_api.download",
         autospec=True,
     )
-    def test_download_item_from_collection(self, mock_download):
+    def test_download_item_from_collection_api_plugin(self, mock_download):
         """Download through eodag server catalog should return a valid response"""
         # download returns a file that must be returned as is
         tmp_dl_dir = TemporaryDirectory()
@@ -635,6 +635,11 @@ class RequestTestCase(unittest.TestCase):
         Path(expected_file).touch()
         mock_download.return_value = expected_file
 
+        # use an external python API provider for this test
+        self._request_valid_raw.patchings[0].kwargs["return_value"][0][
+            0
+        ].provider = "cop_cds"
+
         response = self._request_valid_raw(
             f"collections/{self.tested_product_type}/items/foo/download"
         )