notifications.tests package#

Submodules#

notifications.tests.common_functions module#

notifications.tests.common_functions.check_email_sent(manager: CobaltTestManagerIntegration, test_name: str, test_description: str, email_to: str = None, subject_search: str = None, body_search: str = None, email_count: int = 10, debug: bool = False)[source]#
Check if an email has been sent. This isn’t the greatest test going around. Email addresses get changed

by the playpen checks and you can also find older emails that match by accident. Emails really need to be manually tested as you need to look at the presentation as well as the content, but this is better than nothing.

Parameters:
  • manager – standard manager object

  • test_name – Name for this test to appear in report

  • test_description – Description for this test

  • subject_search – string to search for in the email subject

  • body_search – string to search for in the email body

  • email_to – first name of person sent the email. Assumes using normal templates for this.

  • email_count – how many recent emails to look through

  • debug – print diagnostics

Module contents#