Skip to content

Commit

Permalink
Fix test so that at_dt is older than now
Browse files Browse the repository at this point in the history
  • Loading branch information
joelostblom committed Jun 18, 2020
1 parent 76583bc commit 1d772c5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,5 +188,9 @@ def test_stop_valid_time(runner, watson, mocker, at_dt):

@pytest.mark.parametrize('at_dt', VALID_TIMES_DATA)
def test_start_valid_time(runner, watson, mocker, at_dt):
# Simulate a start date so that 'at_dt' is older than now().
mocker.patch('arrow.arrow.datetime', wraps=datetime)
start_dt = datetime(2019, 4, 10, 14, 0, 0, tzinfo=tzlocal())
arrow.arrow.datetime.now.return_value = (start_dt + timedelta(hours=1))
result = runner.invoke(cli.start, ['a-project', '--at', at_dt], obj=watson)
assert result.exit_code == 0

0 comments on commit 1d772c5

Please sign in to comment.