Skip to content

Commit

Permalink
Add logger to change title test
Browse files Browse the repository at this point in the history
  • Loading branch information
jh27539 committed Jan 5, 2024
1 parent 87698f9 commit f27ee57
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pages/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,18 @@ def verify_log_entry(session, driver, node_id, action, **kwargs):
# Verify project title is in the log entry
assert project_title in log_item_1_text
assert log_params['params_node']['title'] == project_title

import logging

logger = logging.getLogger(__name__)
# Verify current date is also in the log entry
now = datetime.now()
utc_now = datetime.utcnow()

# The front end uses whatever time zone your web browser is synced to
date_today = now.strftime('%Y-%m-%d')
logger.error('Date today: {}'.format(date_today))
logger.error('Log Item Text1: {}'.format(log_item_1_text))
assert date_today in log_item_1_text

# The API logs time in UTC
Expand Down

0 comments on commit f27ee57

Please sign in to comment.