Skip to content

Commit

Permalink
✅ fix rejected_analysis test
Browse files Browse the repository at this point in the history
  • Loading branch information
juanesarango committed Oct 24, 2023
1 parent 51f24bd commit c59cc91
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion isabl_cli/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ def patch_analysis_status(analysis, status):
analysis["status"] = status # make sure that the analysis status is updated
_set_analysis_permissions(analysis)

if status in {"FAILED", "SUCCEEDED", "IN_PROGRESS"}:
if status in {"FAILED", "SUCCEEDED", "IN_PROGRESS", "REJECTED"}:
data["storage_usage"] = utils.get_tree_size(storage_url)

if status == "STARTED":
Expand Down
2 changes: 1 addition & 1 deletion isabl_cli/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,4 +477,4 @@ def reject_analysis(key, reason):
"""Patch an analysis status as REJECTED, providing the rejection reason."""
analysis = api.get_instance("analyses", key)
api.patch_analysis_status(analysis, "REJECTED")
api.patch_instance("analyses", key, {"notes": reason})
api.patch_instance("analyses", key, notes=reason)
5 changes: 3 additions & 2 deletions isabl_cli/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,13 @@
"isabl_cli.commands.get_reference",
"isabl_cli.commands.get_results",
"isabl_cli.commands.login",
"isabl_cli.commands.merge_project_analyses",
"isabl_cli.commands.merge_individual_analyses",
"isabl_cli.commands.merge_project_analyses",
"isabl_cli.commands.patch_status",
"isabl_cli.commands.reject_analysis",
"isabl_cli.commands.rerun_signals",
"isabl_cli.commands.run_web_signals",
"isabl_cli.commands.run_signals",
"isabl_cli.commands.run_web_signals",
],
"EXTRA_RAW_DATA_FORMATS": [],
}
Expand Down
3 changes: 1 addition & 2 deletions tests/test_commands.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
from click.testing import CliRunner
import pytest
import click

from isabl_cli import api
from isabl_cli import commands
Expand Down Expand Up @@ -331,6 +329,7 @@ def test_rejected_analysis(tmpdir):
analysis = api.create_instance(
"analyses",
status="FINISHED",
storage_url=tmpdir.strpath,
**factories.AnalysisFactory(ran_by=None),
)
runner = CliRunner()
Expand Down

0 comments on commit c59cc91

Please sign in to comment.