Skip to content

Commit

Permalink
test: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
renaudjester committed Jul 12, 2024
1 parent 3e0e300 commit 606d05a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion copernicusmarine/core_functions/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ def get_function(
if not get_request.dataset_id:
raise ValueError("Please provide a dataset id for a get request.")
request_update_dict = {
"dataset_id": dataset_id,
"force_dataset_version": force_dataset_version,
"output_directory": output_directory,
"force_service": force_service,
Expand Down
3 changes: 1 addition & 2 deletions copernicusmarine/core_functions/subset.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ def subset_function(
)
subset_request.update(motu_api_subset_request.__dict__)
request_update_dict = {
"dataset_id": dataset_id,
"force_dataset_version": force_dataset_version,
"force_dataset_part": force_dataset_part,
"variables": variables,
Expand Down Expand Up @@ -142,7 +141,7 @@ def subset_function(
raise SyntaxError("Must specify 'dataset_id' option")
logger.info(
"To retrieve a complete dataset, please use instead: "
f"copernicusmarine get --dataset-id {dataset_id}"
f"copernicusmarine get --dataset-id {subset_request.dataset_id}"
)
raise ValueError(
"Missing subset option. Try 'copernicusmarine subset --help'."
Expand Down
4 changes: 2 additions & 2 deletions tests/__snapshots__/test_help_command_interface.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
' downloaded if none of the --filter or --regex options is specified.',
'',
'Options:',
' -i, --dataset-id TEXT The datasetID. [required]',
' -i, --dataset-id TEXT The datasetID.',
' --dataset-version, --force-dataset-version TEXT',
' Force the selection of a specific dataset',
' version.',
Expand Down Expand Up @@ -213,7 +213,7 @@
' ones from the --request-file option.',
'',
'Options:',
' -i, --dataset-id TEXT The datasetID. [required]',
' -i, --dataset-id TEXT The datasetID.',
' --dataset-version, --force-dataset-version TEXT',
' Force the selection of a specific dataset',
' version.',
Expand Down

0 comments on commit 606d05a

Please sign in to comment.