Skip to content

Commit

Permalink
fix formatting error due to f-string missing placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
RuthShryock committed Oct 31, 2024
1 parent 8cbde84 commit f0d7f11
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions kpi/tests/test_export_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,17 @@ def test_export_task_success(self, mock_get_project_view, mock_send_mail):
mock_send_mail.assert_called_once()
args, kwargs = mock_send_mail.call_args
expected_message = (
f'Hello {self.user.username},\n\n'
f'Your report is complete: '
f'http://kf.kobo.local:8080/private-media/{self.user.username}/exports/'
f'assets-{self.user.username}-view_summary-'
+ datetime.datetime.now().strftime('%Y-%m-%dT%H%M%SZ') + '.csv\n\n'
f'Regards,\n'
f'KoboToolbox'
'Hello {},\n\n'
'Your report is complete: '
'http://kf.kobo.local:8080/private-media/{}/exports/'
'assets-{}-view_summary-{}.csv\n\n'
'Regards,\n'
'KoboToolbox'
).format(
self.user.username,
self.user.username,
self.user.username,
datetime.datetime.now().strftime('%Y-%m-%dT%H%M%SZ'),
)
self.assertEqual(kwargs['subject'], 'Project View Report Complete')
self.assertEqual(expected_message, kwargs['message'])
Expand Down

0 comments on commit f0d7f11

Please sign in to comment.