Repository: CS-SI/eodag (python)

Issue:
rename camelCase parameters and methods
Rename:
- `sortBy` to `sortby`
- `orderDownload` to `order_download`
- `orderDownloadStatus` to `order_download_status`

Pull request description:
refactor(core): rename some parameters and methods to snake_case
Fixes #1247 

Rename `sortBy`, `orderDownload` and `orderDownloadStatus` from their *camelCase* name to *snake_case*:

`sort_by`, `order_download` and `order_download_status` 

Patch:
diff --git a/docs/notebooks/api_user_guide/4_search.ipynb b/docs/notebooks/api_user_guide/4_search.ipynb
index c131f344..ac416c2b 100644
--- a/docs/notebooks/api_user_guide/4_search.ipynb
+++ b/docs/notebooks/api_user_guide/4_search.ipynb
@@ -2140,14 +2140,14 @@
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "#### `sortBy`"
+    "#### `sort_by`"
    ]
   },
   {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
-    "EO products can be sorted by metadata that the provider used supports as sorting parameters (see the [available_sortables()](../../api_reference/core.rst#eodag.api.core.EODataAccessGateway.available_sortables) method) in the wanted sorting order (`ASC`|`DESC`) by passing the `sortBy` kwarg. If `sortBy` is not passed but the provider has a default sorting parameter, the sort is realized with it. If the number of sorting parameters exceeds the maximum allowed for the provider or if the provider does not support the sorting feature or at least one sorting parameter, an error is returned."
+    "EO products can be sorted by metadata that the provider used supports as sorting parameters (see the [available_sortables()](../../api_reference/core.rst#eodag.api.core.EODataAccessGateway.available_sortables) method) in the wanted sorting order (`ASC`|`DESC`) by passing the `sort_by` kwarg. If `sort_by` is not passed but the provider has a default sorting parameter, the sort is realized with it. If the number of sorting parameters exceeds the maximum allowed for the provider or if the provider does not support the sorting feature or at least one sorting parameter, an error is returned."
    ]
   },
   {
@@ -2183,7 +2183,7 @@
     ")\n",
     "sorted_by_start_date_in_desc_order_products = dag.search(\n",
     "    provider=\"cop_dataspace\",\n",
-    "    sortBy=[(\"startTimeFromAscendingNode\", \"DESC\")],\n",
+    "    sort_by=[(\"startTimeFromAscendingNode\", \"DESC\")],\n",
     "    **default_search_criteria\n",
     ")\n",
     "print(\n",
diff --git a/eodag/plugins/apis/usgs.py b/eodag/plugins/apis/usgs.py
index d4ecf61f..d15407b2 100644
--- a/eodag/plugins/apis/usgs.py
+++ b/eodag/plugins/apis/usgs.py
@@ -128,13 +128,14 @@ class UsgsApi(Api):
             raise NoMatchingProductType(
                 "Cannot search on USGS without productType specified"
             )
-        if kwargs.get("sortBy"):
+        if kwargs.get("sort_by"):
             raise ValidationError("USGS does not support sorting feature")
 
         self.authenticate()
 
         product_type_def_params = self.config.products.get(  # type: ignore
-            product_type, self.config.products[GENERIC_PRODUCT_TYPE]  # type: ignore
+            product_type,
+            self.config.products[GENERIC_PRODUCT_TYPE],  # type: ignore
         )
         usgs_dataset = format_dict_items(product_type_def_params, **kwargs)["dataset"]
         start_date = kwargs.pop("startTimeFromAscendingNode", None)
@@ -288,7 +289,8 @@ class UsgsApi(Api):
         outputs_extension = cast(
             str,
             self.config.products.get(  # type: ignore
-                product.product_type, self.config.products[GENERIC_PRODUCT_TYPE]  # type: ignore
+                product.product_type,
+                self.config.products[GENERIC_PRODUCT_TYPE],  # type: ignore
             ).get("outputs_extension", ".tar.gz"),
         )
         kwargs["outputs_extension"] = kwargs.get("outputs_extension", outputs_extension)
diff --git a/eodag/plugins/download/http.py b/eodag/plugins/download/http.py
index 51bd67a3..e7cd1510 100644
--- a/eodag/plugins/download/http.py
+++ b/eodag/plugins/download/http.py
@@ -122,7 +122,7 @@ class HTTPDownload(Download):
     def __init__(self, provider: str, config: PluginConfig) -> None:
         super(HTTPDownload, self).__init__(provider, config)
 
-    def orderDownload(
+    def order_download(
         self,
         product: EOProduct,
         auth: Optional[AuthBase] = None,
@@ -257,7 +257,7 @@ class HTTPDownload(Download):
 
         return json_response
 
-    def orderDownloadStatus(
+    def order_download_status(
         self,
         product: EOProduct,
         auth: Optional[AuthBase] = None,
@@ -934,13 +934,13 @@ class HTTPDownload(Download):
             and product.properties.get("storageStatus") == OFFLINE_STATUS
             and not product.properties.get("orderStatus")
         ):
-            self.orderDownload(product=product, auth=auth)
+            self.order_download(product=product, auth=auth)
 
         if (
             product.properties.get("orderStatusLink", None)
             and product.properties.get("storageStatus") != ONLINE_STATUS
         ):
-            self.orderDownloadStatus(product=product, auth=auth)
+            self.order_download_status(product=product, auth=auth)
 
         params = kwargs.pop("dl_url_params", None) or getattr(
             self.config, "dl_url_params", {}
@@ -1083,7 +1083,6 @@ class HTTPDownload(Download):
 
         # loop for assets download
         for asset in assets_values:
-
             if not asset["href"] or asset["href"].startswith("file:"):
                 logger.info(
                     f"Local asset detected. Download skipped for {asset['href']}"
diff --git a/eodag/plugins/download/s3rest.py b/eodag/plugins/download/s3rest.py
index f3349661..39517b20 100644
--- a/eodag/plugins/download/s3rest.py
+++ b/eodag/plugins/download/s3rest.py
@@ -133,7 +133,7 @@ class S3RestDownload(Download):
             and "storageStatus" in product.properties
             and product.properties["storageStatus"] != ONLINE_STATUS
         ):
-            self.http_download_plugin.orderDownload(product=product, auth=auth)
+            self.http_download_plugin.order_download(product=product, auth=auth)
 
         @self._download_retry(product, wait, timeout)
         def download_request(
@@ -145,7 +145,7 @@ class S3RestDownload(Download):
         ):
             # check order status
             if product.properties.get("orderStatusLink", None):
-                self.http_download_plugin.orderDownloadStatus(
+                self.http_download_plugin.order_download_status(
                     product=product, auth=auth
                 )
 
diff --git a/eodag/plugins/search/base.py b/eodag/plugins/search/base.py
index d0318a88..1ac9dd00 100644
--- a/eodag/plugins/search/base.py
+++ b/eodag/plugins/search/base.py
@@ -206,16 +206,16 @@ class Search(PluginTopic):
         return self.config.metadata_mapping
 
     def get_sort_by_arg(self, kwargs: Dict[str, Any]) -> Optional[SortByList]:
-        """Extract the "sortBy" argument from the kwargs or the provider default sort configuration
+        """Extract the "sort_by" argument from the kwargs or the provider default sort configuration
 
         :param kwargs: Search arguments
         :type kwargs: Dict[str, Any]
-        :returns: The "sortBy" argument from the kwargs or the provider default sort configuration
+        :returns: The "sort_by" argument from the kwargs or the provider default sort configuration
         :rtype: :class:`~eodag.types.search_args.SortByList`
         """
-        # remove "sortBy" from search args if exists because it is not part of metadata mapping,
+        # remove "sort_by" from search args if exists because it is not part of metadata mapping,
         # it will complete the query string or body once metadata mapping will be done
-        sort_by_arg_tmp = kwargs.pop("sortBy", None)
+        sort_by_arg_tmp = kwargs.pop("sort_by", None)
         sort_by_arg = sort_by_arg_tmp or getattr(self.config, "sort", {}).get(
             "sort_by_default", None
         )
@@ -230,11 +230,11 @@ class Search(PluginTopic):
         self, sort_by_arg: SortByList
     ) -> Tuple[str, Dict[str, List[Dict[str, str]]]]:
         """Build the sorting part of the query string or body by transforming
-        the "sortBy" argument into a provider-specific string or dictionnary
+        the "sort_by" argument into a provider-specific string or dictionnary
 
-        :param sort_by_arg: the "sortBy" argument in EODAG format
+        :param sort_by_arg: the "sort_by" argument in EODAG format
         :type sort_by_arg: :class:`~eodag.types.search_args.SortByList`
-        :returns: The "sortBy" argument in provider-specific format
+        :returns: The "sort_by" argument in provider-specific format
         :rtype: Union[str, Dict[str, List[Dict[str, str]]]]
         """
         if not hasattr(self.config, "sort"):
diff --git a/eodag/plugins/search/data_request_search.py b/eodag/plugins/search/data_request_search.py
index 2c990b1f..1ba34563 100644
--- a/eodag/plugins/search/data_request_search.py
+++ b/eodag/plugins/search/data_request_search.py
@@ -133,7 +133,7 @@ class DataRequestSearch(Search):
         """
         performs the search for a provider where several steps are required to fetch the data
         """
-        if kwargs.get("sortBy"):
+        if kwargs.get("sort_by"):
             raise ValidationError(f"{self.provider} does not support sorting feature")
 
         product_type = kwargs.get("productType", None)
diff --git a/eodag/rest/core.py b/eodag/rest/core.py
index 656fb593..6fb159ed 100644
--- a/eodag/rest/core.py
+++ b/eodag/rest/core.py
@@ -350,11 +350,13 @@ def _order_and_update(
     if (
         product.properties.get("storageStatus") != ONLINE_STATUS
         and NOT_AVAILABLE in product.properties.get("orderStatusLink", "")
-        and hasattr(product.downloader, "orderDownload")
+        and hasattr(product.downloader, "order_download")
     ):
         # first order
         logger.debug("Order product")
-        order_status_dict = product.downloader.orderDownload(product=product, auth=auth)
+        order_status_dict = product.downloader.order_download(
+            product=product, auth=auth
+        )
         query_args.update(order_status_dict or {})
 
     if (
@@ -365,11 +367,11 @@ def _order_and_update(
         product.properties["storageStatus"] = STAGING_STATUS
 
     if product.properties.get("storageStatus") == STAGING_STATUS and hasattr(
-        product.downloader, "orderDownloadStatus"
+        product.downloader, "order_download_status"
     ):
         # check order status if needed
         logger.debug("Checking product order status")
-        product.downloader.orderDownloadStatus(product=product, auth=auth)
+        product.downloader.order_download_status(product=product, auth=auth)
 
     if product.properties.get("storageStatus") != ONLINE_STATUS:
         raise NotAvailableError("Product is not available yet")
diff --git a/eodag/rest/types/eodag_search.py b/eodag/rest/types/eodag_search.py
index 2557d83b..38089cbf 100644
--- a/eodag/rest/types/eodag_search.py
+++ b/eodag/rest/types/eodag_search.py
@@ -110,7 +110,7 @@ class EODAGSearch(BaseModel):
     illuminationAzimuthAngle: Optional[float] = Field(None, alias="view:sun_azimuth")
     page: Optional[int] = Field(1)
     items_per_page: int = Field(DEFAULT_ITEMS_PER_PAGE, alias="limit")
-    sortBy: Optional[List[Tuple[str, str]]] = Field(None, alias="sortby")
+    sort_by: Optional[List[Tuple[str, str]]] = Field(None, alias="sortby")
     raise_errors: bool = False
 
     _to_eodag_map: Dict[str, str]
@@ -311,14 +311,14 @@ class EODAGSearch(BaseModel):
             return ",".join(v)
         return v
 
-    @field_validator("sortBy", mode="before")
+    @field_validator("sort_by", mode="before")
     @classmethod
     def parse_sortby(
         cls,
         sortby_post_params: List[Dict[str, str]],
     ) -> List[Tuple[str, str]]:
         """
-        Convert STAC POST sortby to EODAG sortby
+        Convert STAC POST sortby to EODAG sort_by
         """
         special_fields = {
             "start": "startTimeFromAscendingNode",
diff --git a/eodag/rest/types/stac_search.py b/eodag/rest/types/stac_search.py
index 6f04da23..2675bacb 100644
--- a/eodag/rest/types/stac_search.py
+++ b/eodag/rest/types/stac_search.py
@@ -16,6 +16,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 """Model describing a STAC search POST request"""
+
 from __future__ import annotations
 
 from typing import TYPE_CHECKING, Any, Dict, List, Literal, Optional, Tuple, Union
@@ -71,7 +72,7 @@ Geometry = Union[
 Direction = Annotated[Literal["asc", "desc"], StringConstraints(min_length=1)]
 
 
-class Sortby(BaseModel):
+class SortBy(BaseModel):
     """
     A class representing a parameter with which we want to sort results and its sorting order in a
     POST search
@@ -117,7 +118,7 @@ class SearchPostRequest(BaseModel):
         description="The language used for filtering.",
         validate_default=True,
     )
-    sortby: Optional[List[Sortby]] = None
+    sortby: Optional[List[SortBy]] = None
     crunch: Optional[str] = None
 
     @field_serializer("intersects")
@@ -259,16 +260,16 @@ class SearchPostRequest(BaseModel):
 
 def sortby2list(
     v: Optional[str],
-) -> Optional[List[Sortby]]:
+) -> Optional[List[SortBy]]:
     """
     Convert sortby filter parameter GET syntax to POST syntax
     """
     if not v:
         return None
-    sortby: List[Sortby] = []
+    sortby: List[SortBy] = []
     for sortby_param in v.split(","):
         sortby_param = sortby_param.strip()
         direction: Direction = "desc" if sortby_param.startswith("-") else "asc"
         field = sortby_param.lstrip("+-")
-        sortby.append(Sortby(field=field, direction=direction))
+        sortby.append(SortBy(field=field, direction=direction))
     return sortby
diff --git a/eodag/types/search_args.py b/eodag/types/search_args.py
index e3f5510c..0ebc6e7d 100644
--- a/eodag/types/search_args.py
+++ b/eodag/types/search_args.py
@@ -51,7 +51,7 @@ class SearchArgs(BaseModel):
     locations: Optional[Dict[str, str]] = Field(None)
     page: Optional[int] = Field(DEFAULT_PAGE, gt=0)  # type: ignore
     items_per_page: Optional[PositiveInt] = Field(DEFAULT_ITEMS_PER_PAGE)  # type: ignore
-    sortBy: Optional[SortByList] = Field(None)  # type: ignore
+    sort_by: Optional[SortByList] = Field(None)  # type: ignore
 
     @field_validator("start", "end", mode="before")
     @classmethod
@@ -87,16 +87,17 @@ class SearchArgs(BaseModel):
 
         raise TypeError(f"Invalid geometry type: {type(v)}")
 
-    @field_validator("sortBy", mode="before")
+    @field_validator("sort_by", mode="before")
     @classmethod
     def check_sort_by_arg(
-        cls, sort_by_arg: Optional[SortByList]  # type: ignore
+        cls,
+        sort_by_arg: Optional[SortByList],  # type: ignore
     ) -> Optional[SortByList]:  # type: ignore
-        """Check if the sortBy argument is correct
+        """Check if the sort_by argument is correct
 
-        :param sort_by_arg: The sortBy argument
+        :param sort_by_arg: The sort_by argument
         :type sort_by_arg: str
-        :returns: The sortBy argument with sorting order parsed (whitespace(s) are
+        :returns: The sort_by argument with sorting order parsed (whitespace(s) are
                   removed and only the 3 first letters in uppercase are kept)
         :rtype: str
         """


Test patch:
diff --git a/tests/units/test_core.py b/tests/units/test_core.py
index 9fc9cdd9..63749da5 100644
--- a/tests/units/test_core.py
+++ b/tests/units/test_core.py
@@ -2669,7 +2669,7 @@ class TestCoreSearch(TestCoreBase):
         mock_postjsonsearch__request,
     ):
         """search must sort results by sorting parameter(s) in their sorting order
-        from the "sortBy" argument or by default sorting parameter if exists"""
+        from the "sort_by" argument or by default sorting parameter if exists"""
         mock_qssearch__request.return_value.json.return_value = {
             "properties": {"totalResults": 2},
             "features": [],
@@ -2720,7 +2720,7 @@ class TestCoreSearch(TestCoreBase):
         dag.search(
             provider="dummy_provider",
             productType="S2_MSI_L1C",
-            sortBy=[("eodagSortParam", "DESC")],
+            sort_by=[("eodagSortParam", "DESC")],
         )
 
         # a provider-specific string has been created to sort by
@@ -2739,7 +2739,7 @@ class TestCoreSearch(TestCoreBase):
                     next_page_query_obj: '{{"limit":{items_per_page},"page":{page}}}'
                     total_items_nb_key_path: '$.meta.found'
                 sort:
-                    sort_by_tpl: '{{"sortby": [ {{"field": "{sort_param}", "direction": "{sort_order}" }} ] }}'
+                    sort_by_tpl: '{{"sort_by": [ {{"field": "{sort_param}", "direction": "{sort_order}" }} ] }}'
                     sort_param_mapping:
                         eodagSortParam: providerSortParam
                     sort_order_mapping:
@@ -2755,22 +2755,22 @@ class TestCoreSearch(TestCoreBase):
         dag.search(
             provider="other_dummy_provider",
             productType="S2_MSI_L1C",
-            sortBy=[("eodagSortParam", "DESC")],
+            sort_by=[("eodagSortParam", "DESC")],
         )
 
         # a provider-specific dictionnary has been created to sort by
         self.assertIn(
-            "sortby", mock_postjsonsearch__request.call_args[0][1].query_params.keys()
+            "sort_by", mock_postjsonsearch__request.call_args[0][1].query_params.keys()
         )
         self.assertEqual(
             [{"field": "providerSortParam", "direction": "desc"}],
-            mock_postjsonsearch__request.call_args[0][1].query_params["sortby"],
+            mock_postjsonsearch__request.call_args[0][1].query_params["sort_by"],
         )
 
         # TODO: sort by default sorting parameter and sorting order
 
     def test_search_sort_by_raise_errors(self):
-        """search used with "sortBy" argument must raise errors if the argument is incorrect or if the provider does
+        """search used with "sort_by" argument must raise errors if the argument is incorrect or if the provider does
         not support a maximum number of sorting parameter, one sorting parameter or the sorting feature
         """
         dag = EODataAccessGateway()
@@ -2794,7 +2794,7 @@ class TestCoreSearch(TestCoreBase):
             dag.search(
                 provider="dummy_provider",
                 productType="S2_MSI_L1C",
-                sortBy=[("eodagSortParam", "ASC")],
+                sort_by=[("eodagSortParam", "ASC")],
             )
             self.assertIn(
                 "dummy_provider does not support sorting feature", str(cm_logs.output)
@@ -2827,7 +2827,7 @@ class TestCoreSearch(TestCoreBase):
             dag.search(
                 provider="dummy_provider",
                 productType="S2_MSI_L1C",
-                sortBy=[("otherEodagSortParam", "ASC")],
+                sort_by=[("otherEodagSortParam", "ASC")],
             )
             self.assertIn(
                 "\\'otherEodagSortParam\\' parameter is not sortable with dummy_provider. "
@@ -2864,7 +2864,7 @@ class TestCoreSearch(TestCoreBase):
             dag.search(
                 provider="dummy_provider",
                 productType="S2_MSI_L1C",
-                sortBy=[("eodagSortParam", "ASC"), ("otherEodagSortParam", "ASC")],
+                sort_by=[("eodagSortParam", "ASC"), ("otherEodagSortParam", "ASC")],
             )
             self.assertIn(
                 "Search results can be sorted by only 1 parameter(s) with dummy_provider",
diff --git a/tests/units/test_download_plugins.py b/tests/units/test_download_plugins.py
index e8e0574e..2e4f49cb 100644
--- a/tests/units/test_download_plugins.py
+++ b/tests/units/test_download_plugins.py
@@ -1122,7 +1122,7 @@ class TestDownloadPluginHttp(BaseDownloadPluginTest):
 
     @mock.patch("eodag.plugins.download.http.requests.request", autospec=True)
     def test_plugins_download_http_order_get(self, mock_request):
-        """HTTPDownload.orderDownload() must request using orderLink and GET protocol"""
+        """HTTPDownload.order_download() must request using orderLink and GET protocol"""
         plugin = self.get_download_plugin(self.product)
         self.product.properties["orderLink"] = "http://somewhere/order"
         self.product.properties["storageStatus"] = OFFLINE_STATUS
@@ -1135,7 +1135,7 @@ class TestDownloadPluginHttp(BaseDownloadPluginTest):
             auth_plugin.config.credentials = {"username": "foo", "password": "bar"}
             auth = auth_plugin.authenticate()
 
-            plugin.orderDownload(self.product, auth=auth)
+            plugin.order_download(self.product, auth=auth)
 
             mock_request.assert_called_once_with(
                 method="GET",
@@ -1153,7 +1153,7 @@ class TestDownloadPluginHttp(BaseDownloadPluginTest):
 
     @mock.patch("eodag.plugins.download.http.requests.request", autospec=True)
     def test_plugins_download_http_order_post(self, mock_request):
-        """HTTPDownload.orderDownload() must request using orderLink and POST protocol"""
+        """HTTPDownload.order_download() must request using orderLink and POST protocol"""
         plugin = self.get_download_plugin(self.product)
         self.product.properties["storageStatus"] = OFFLINE_STATUS
         plugin.config.order_method = "POST"
@@ -1164,7 +1164,7 @@ class TestDownloadPluginHttp(BaseDownloadPluginTest):
 
         # orderLink without query query args
         self.product.properties["orderLink"] = "http://somewhere/order"
-        plugin.orderDownload(self.product, auth=auth)
+        plugin.order_download(self.product, auth=auth)
         mock_request.assert_called_once_with(
             method="POST",
             url=self.product.properties["orderLink"],
@@ -1176,7 +1176,7 @@ class TestDownloadPluginHttp(BaseDownloadPluginTest):
         # orderLink with query query args
         mock_request.reset_mock()
         self.product.properties["orderLink"] = "http://somewhere/order?foo=bar"
-        plugin.orderDownload(self.product, auth=auth)
+        plugin.order_download(self.product, auth=auth)
         mock_request.assert_called_once_with(
             method="POST",
             url="http://somewhere/order",
@@ -1192,7 +1192,7 @@ class TestDownloadPluginHttp(BaseDownloadPluginTest):
         self.product.properties[
             "orderLink"
         ] = 'http://somewhere/order?{"location": "dataset_id=lorem&data_version=202211", "cacheable": "true"}'
-        plugin.orderDownload(self.product, auth=auth)
+        plugin.order_download(self.product, auth=auth)
         mock_request.assert_called_once_with(
             method="POST",
             url="http://somewhere/order",
@@ -1207,7 +1207,7 @@ class TestDownloadPluginHttp(BaseDownloadPluginTest):
         )
 
     def test_plugins_download_http_order_status(self):
-        """HTTPDownload.orderDownloadStatus() must request status using orderStatusLink"""
+        """HTTPDownload.order_download_status() must request status using orderStatusLink"""
         plugin = self.get_download_plugin(self.product)
         plugin.config.order_status = {
             "metadata_mapping": {
@@ -1233,7 +1233,7 @@ class TestDownloadPluginHttp(BaseDownloadPluginTest):
             )
 
             with self.assertRaises(DownloadError):
-                plugin.orderDownloadStatus(self.product, auth=auth)
+                plugin.order_download_status(self.product, auth=auth)
 
             self.assertIn(
                 list(USER_AGENT.items())[0], responses.calls[0].request.headers.items()
@@ -1243,7 +1243,7 @@ class TestDownloadPluginHttp(BaseDownloadPluginTest):
         run()
 
     def test_plugins_download_http_order_status_search_again(self):
-        """HTTPDownload.orderDownloadStatus() must search again after success if needed"""
+        """HTTPDownload.order_download_status() must search again after success if needed"""
         plugin = self.get_download_plugin(self.product)
         plugin.config.order_status = {
             "metadata_mapping": {"status": "$.json.status"},
@@ -1284,7 +1284,7 @@ class TestDownloadPluginHttp(BaseDownloadPluginTest):
                 ),
             )
 
-            plugin.orderDownloadStatus(self.product, auth=auth)
+            plugin.order_download_status(self.product, auth=auth)
 
             self.assertEqual(
                 self.product.properties["downloadLink"], "http://new-download-link"
@@ -1793,9 +1793,11 @@ class TestDownloadPluginS3Rest(BaseDownloadPluginTest):
         )
 
     @mock.patch(
-        "eodag.plugins.download.http.HTTPDownload.orderDownloadStatus", autospec=True
+        "eodag.plugins.download.http.HTTPDownload.order_download_status", autospec=True
+    )
+    @mock.patch(
+        "eodag.plugins.download.http.HTTPDownload.order_download", autospec=True
     )
-    @mock.patch("eodag.plugins.download.http.HTTPDownload.orderDownload", autospec=True)
     def test_plugins_download_s3rest_online(self, mock_order, mock_order_status):
         """S3RestDownload.download() must create outputfiles"""
 
@@ -1863,9 +1865,11 @@ class TestDownloadPluginS3Rest(BaseDownloadPluginTest):
         mock_order_status.assert_not_called()
 
     @mock.patch(
-        "eodag.plugins.download.http.HTTPDownload.orderDownloadStatus", autospec=True
+        "eodag.plugins.download.http.HTTPDownload.order_download_status", autospec=True
+    )
+    @mock.patch(
+        "eodag.plugins.download.http.HTTPDownload.order_download", autospec=True
     )
-    @mock.patch("eodag.plugins.download.http.HTTPDownload.orderDownload", autospec=True)
     def test_plugins_download_s3rest_offline(self, mock_order, mock_order_status):
         """S3RestDownload.download() must order offline products"""
 
diff --git a/tests/units/test_http_server.py b/tests/units/test_http_server.py
index f47acbdb..92343125 100644
--- a/tests/units/test_http_server.py
+++ b/tests/units/test_http_server.py
@@ -1242,8 +1242,8 @@ class RequestTestCase(unittest.TestCase):
         product = two_results[0]
         mock_search.return_value = SearchResult([product], 1)
         product.downloader_auth = MagicMock()
-        product.downloader.orderDownload = MagicMock(return_value={"status": "foo"})
-        product.downloader.orderDownloadStatus = MagicMock()
+        product.downloader.order_download = MagicMock(return_value={"status": "foo"})
+        product.downloader.order_download_status = MagicMock()
         product.downloader.order_response_process = MagicMock()
         product.downloader._stream_download_dict = MagicMock(
             side_effect=NotAvailableError("Product offline. Try again later.")
@@ -1257,8 +1257,8 @@ class RequestTestCase(unittest.TestCase):
         self._request_not_found(
             f"catalogs/{self.tested_product_type}/items/foo/download"
         )
-        product.downloader.orderDownload.assert_not_called()
-        product.downloader.orderDownloadStatus.assert_not_called()
+        product.downloader.order_download.assert_not_called()
+        product.downloader.order_download_status.assert_not_called()
         product.downloader.order_response_process.assert_not_called()
         product.downloader._stream_download_dict.assert_called_once()
         product.downloader._stream_download_dict.reset_mock()
@@ -1269,9 +1269,9 @@ class RequestTestCase(unittest.TestCase):
         resp_json = self._request_accepted(
             f"catalogs/{self.tested_product_type}/items/foo/download"
         )
-        product.downloader.orderDownload.assert_called_once()
-        product.downloader.orderDownload.reset_mock()
-        product.downloader.orderDownloadStatus.assert_not_called()
+        product.downloader.order_download.assert_called_once()
+        product.downloader.order_download.reset_mock()
+        product.downloader.order_download_status.assert_not_called()
         product.downloader.order_response_process.assert_called()
         product.downloader.order_response_process.reset_mock()
         product.downloader._stream_download_dict.assert_not_called()
@@ -1284,8 +1284,8 @@ class RequestTestCase(unittest.TestCase):
         resp_json = self._request_accepted(
             f"catalogs/{self.tested_product_type}/items/foo/download"
         )
-        product.downloader.orderDownload.assert_not_called()
-        product.downloader.orderDownloadStatus.assert_not_called()
+        product.downloader.order_download.assert_not_called()
+        product.downloader.order_download_status.assert_not_called()
         product.downloader.order_response_process.assert_not_called()
         product.downloader._stream_download_dict.assert_called_once()
         product.downloader._stream_download_dict.reset_mock()
@@ -1298,9 +1298,9 @@ class RequestTestCase(unittest.TestCase):
         self._request_accepted(
             f"catalogs/{self.tested_product_type}/items/foo/download"
         )
-        product.downloader.orderDownload.assert_not_called()
-        product.downloader.orderDownloadStatus.assert_called_once()
-        product.downloader.orderDownloadStatus.reset_mock()
+        product.downloader.order_download.assert_not_called()
+        product.downloader.order_download_status.assert_called_once()
+        product.downloader.order_download_status.reset_mock()
         product.downloader.order_response_process.assert_called()
         product.downloader.order_response_process.reset_mock()
         product.downloader._stream_download_dict.assert_not_called()
diff --git a/tests/units/test_search_types.py b/tests/units/test_search_types.py
index 747abd83..1453424a 100644
--- a/tests/units/test_search_types.py
+++ b/tests/units/test_search_types.py
@@ -26,24 +26,27 @@ from eodag.utils.exceptions import ValidationError as EodagValidationError
 
 class TestStacSearch(unittest.TestCase):
     def test_search_sort_by_arg(self):
-        """search used with "sortBy" argument must not raise errors if the argument is correct"""
-        # "sortBy" argument must be a list of tuples of two elements and the second element must be "ASC" or "DESC"
+        """search used with "sort_by" argument must not raise errors if the argument is correct"""
+        # "sort_by" argument must be a list of tuples of two elements and the second element must be "ASC" or "DESC"
         search_args.SearchArgs.model_validate(
-            {"productType": "dummy_product_type", "sortBy": [("eodagSortParam", "ASC")]}
+            {
+                "productType": "dummy_product_type",
+                "sort_by": [("eodagSortParam", "ASC")],
+            }
         )
         search_args.SearchArgs.model_validate(
             {
                 "productType": "dummy_product_type",
-                "sortBy": [("eodagSortParam", "DESC")],
+                "sort_by": [("eodagSortParam", "DESC")],
             }
         )
 
     def test_search_sort_by_arg_with_errors(self):
-        """search used with "sortBy" argument must raise errors if the argument is incorrect"""
+        """search used with "sort_by" argument must raise errors if the argument is incorrect"""
         # raise a Pydantic error with an empty list
         with self.assertRaises(ValidationError) as context:
             search_args.SearchArgs.model_validate(
-                {"productType": "dummy_product_type", "sortBy": []}
+                {"productType": "dummy_product_type", "sort_by": []}
             )
         self.assertIn(
             "List should have at least 1 item after validation, not 0",
@@ -52,7 +55,7 @@ class TestStacSearch(unittest.TestCase):
         # raise a Pydantic error with syntax errors
         with self.assertRaises(ValidationError) as context:
             search_args.SearchArgs.model_validate(
-                {"productType": "dummy_product_type", "sortBy": "eodagSortParam ASC"}
+                {"productType": "dummy_product_type", "sort_by": "eodagSortParam ASC"}
             )
         self.assertIn(
             "Sort argument must be a list of tuple(s), got a '<class 'str'>' instead",
@@ -60,7 +63,7 @@ class TestStacSearch(unittest.TestCase):
         )
         with self.assertRaises(ValidationError) as context:
             search_args.SearchArgs.model_validate(
-                {"productType": "dummy_product_type", "sortBy": ["eodagSortParam ASC"]}
+                {"productType": "dummy_product_type", "sort_by": ["eodagSortParam ASC"]}
             )
         self.assertIn(
             "Sort argument must be a list of tuple(s), got a list of '<class 'str'>' instead",
@@ -71,7 +74,7 @@ class TestStacSearch(unittest.TestCase):
             search_args.SearchArgs.model_validate(
                 {
                     "productType": "dummy_product_type",
-                    "sortBy": [("eodagSortParam", " wrong_order ")],
+                    "sort_by": [("eodagSortParam", " wrong_order ")],
                 }
             )
         self.assertIn(
@@ -84,7 +87,7 @@ class TestStacSearch(unittest.TestCase):
             search_args.SearchArgs.model_validate(
                 {
                     "productType": "dummy_product_type",
-                    "sortBy": [("eodagSortParam", "ASC"), ("eodagSortParam", "DESC")],
+                    "sort_by": [("eodagSortParam", "ASC"), ("eodagSortParam", "DESC")],
                 }
             )
         self.assertIn(
diff --git a/tests/units/test_stac_types.py b/tests/units/test_stac_types.py
index fa011285..fb056ad7 100644
--- a/tests/units/test_stac_types.py
+++ b/tests/units/test_stac_types.py
@@ -9,18 +9,18 @@ from eodag.rest.types import eodag_search, stac_search
 class TestStacSearch(unittest.TestCase):
     def test_sortby(self):
         # Test with valid field and direction
-        sortby = stac_search.Sortby(field="test", direction="asc")
+        sortby = stac_search.SortBy(field="test", direction="asc")
         self.assertEqual(sortby.field, "test")
         self.assertEqual(sortby.direction, "asc")
 
         # Test with invalid direction
         with self.assertRaises(ValidationError) as context:
-            stac_search.Sortby(field="test", direction="invalid")
+            stac_search.SortBy(field="test", direction="invalid")
         self.assertTrue("Input should be 'asc' or 'desc'" in str(context.exception))
 
         # Test with empty field
         with self.assertRaises(ValidationError) as context:
-            stac_search.Sortby(field="", direction="asc")
+            stac_search.SortBy(field="", direction="asc")
 
     def test_sortby2list(self):
         # Test with no input
@@ -28,6 +28,7 @@ class TestStacSearch(unittest.TestCase):
 
         # Test with valid input
         sortby_list = stac_search.sortby2list("test,+test2,-test3")
+        self.assertIsNotNone(sortby_list)
         self.assertEqual(len(sortby_list), 3)
         self.assertEqual(sortby_list[0].field, "test")
         self.assertEqual(sortby_list[0].direction, "asc")
@@ -404,7 +405,7 @@ class TestEODAGSearch(unittest.TestCase):
                 exclude_none=True
             ),
             {
-                "sortBy": [("test", "desc")],
+                "sort_by": [("test", "desc")],
                 "productType": "test_collection",
                 "items_per_page": 20,
                 "page": 1,