Skip to content

Commit

Permalink
Use minutes instead of seconds variable
Browse files Browse the repository at this point in the history
  • Loading branch information
sambible committed May 28, 2024
1 parent f743db8 commit 613dc42
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/foreman/ui/test_syncplan.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,8 @@ def test_positive_synchronize_custom_product_custom_cron_real_time(session, modu
# workaround: force session.browser to point to browser object on next line
session.contenthost.read_all('current_user')
start_date = session.browser.get_client_datetime()
next_sync = 5 * 60
# forming cron expression sync repo after 5 min
expected_next_run_time = start_date + timedelta(seconds=next_sync)
expected_next_run_time = start_date + timedelta(minutes=5)
cron_expression = f'{expected_next_run_time.minute} {expected_next_run_time.hour} {expected_next_run_time.day} {expected_next_run_time.month} *'
session.syncplan.create(
{
Expand Down Expand Up @@ -262,9 +261,8 @@ def test_positive_synchronize_custom_product_custom_cron_past_sync_date(
# workaround: force session.browser to point to browser object on next line
session.contenthost.read_all('current_user')
start_date = session.browser.get_client_datetime()
next_sync = 5 * 60
# forming cron expression sync repo after 5 min
expected_next_run_time = start_date + timedelta(seconds=next_sync)
expected_next_run_time = start_date + timedelta(minutes=5)
cron_expression = f'{expected_next_run_time.minute} {expected_next_run_time.hour} {expected_next_run_time.day} {expected_next_run_time.month} *'
session.syncplan.create(
{
Expand Down

0 comments on commit 613dc42

Please sign in to comment.