Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass start at time to stop invoke #480

Merged
merged 6 commits into from
Jul 15, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
assert first frame closed, and current frame tracked
  • Loading branch information
EdgyEdgemond committed Jul 13, 2022
commit 4e6dadcb3b6b5bf729fb8e2f942a59aa4941d3eb
10 changes: 9 additions & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,11 @@ def test_start_existing_frame_stopped(runner, watson, mocker):
mocker.patch('arrow.arrow.dt_datetime', wraps=datetime)
start_dt = datetime(2019, 4, 10, 15, 0, 0, tzinfo=local_tz_info())
arrow.arrow.dt_datetime.now.return_value = start_dt
runner.invoke(cli.start, ['a-project', '--at', "14:10"], obj=watson)
runner.invoke(
cli.start,
['a-project', '--at', "14:10"],
obj=watson,
)

result = runner.invoke(
cli.start,
Expand All @@ -213,6 +217,10 @@ def test_start_existing_frame_stopped(runner, watson, mocker):
)
assert result.exit_code == 0, result.stdout
jmaupetit marked this conversation as resolved.
Show resolved Hide resolved

frame_id = OutputParser.get_frame_id(result.output)
assert watson.frames[frame_id].project == "a-project"
assert watson.current["project"] == "b-project"


# watson restart

Expand Down