Skip to content

Commit

Permalink
#5 renames pa schedule delete 'nuke' to less epic but more informativ…
Browse files Browse the repository at this point in the history
…e 'all' command. by: Piotr
  • Loading branch information
caseneuve committed Mar 13, 2021
1 parent a1b4b8d commit 7d9329c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cli/schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def set(
)


@delete_app.command("nuke", help="Delete all scheduled tasks.")
@delete_app.command("all", help="Delete all scheduled tasks.")
def delete_all_tasks(
force: bool = typer.Option(
False, "-f", "--force", help="Turns off user confirmation before deleting tasks"
Expand Down
8 changes: 4 additions & 4 deletions tests/test_cli_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class TestDeleteAllTasks:
def test_deletes_all_tasks_with_user_permission(self, task_list, mock_confirm):
mock_confirm.return_value = True

runner.invoke(delete_app, ["nuke"])
runner.invoke(delete_app, ["all"])

assert mock_confirm.call_args == call(
"This will irrevocably delete all your tasks, proceed?"
Expand All @@ -75,12 +75,12 @@ def test_deletes_all_tasks_with_user_permission(self, task_list, mock_confirm):
def test_exits_when_user_changes_mind(self, task_list, mock_confirm):
mock_confirm.return_value = False

runner.invoke(delete_app, ["nuke"])
runner.invoke(delete_app, ["all"])

assert task_list.call_count == 0

def test_deletes_all_tasks_when_forced(self, task_list, mock_confirm):
runner.invoke(delete_app, ["nuke", "--force"])
runner.invoke(delete_app, ["all", "--force"])

assert mock_confirm.call_count == 0
assert task_list.call_count == 1
Expand All @@ -90,7 +90,7 @@ def test_deletes_all_tasks_when_forced(self, task_list, mock_confirm):
def test_sets_logging_to_info(self, mocker):
mock_logger = mocker.patch("cli.schedule.get_logger")

runner.invoke(delete_app, ["nuke"])
runner.invoke(delete_app, ["all"])

assert mock_logger.call_args == call(set_info=True)

Expand Down

0 comments on commit 7d9329c

Please sign in to comment.