mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-31 23:26:23 -05:00
- Adding test where post_notification can't send to a member outside of the team or whitelist.
- Updating some tests to be pytest4 compliant.
This commit is contained in:
@@ -59,6 +59,7 @@ from tests.app.db import (
|
||||
create_inbound_number,
|
||||
create_letter_contact,
|
||||
create_invited_org_user,
|
||||
create_job
|
||||
)
|
||||
|
||||
|
||||
@@ -502,13 +503,14 @@ def sample_notification_with_job(
|
||||
api_key=None,
|
||||
key_type=KEY_TYPE_NORMAL
|
||||
):
|
||||
if not service:
|
||||
service = create_service()
|
||||
if not template:
|
||||
template = create_template(service=service)
|
||||
if job is None:
|
||||
job = sample_job(notify_db, notify_db_session, service=service, template=template)
|
||||
return sample_notification(
|
||||
notify_db,
|
||||
notify_db_session,
|
||||
service,
|
||||
template,
|
||||
job = create_job(template=template)
|
||||
return create_notification(
|
||||
template=template,
|
||||
job=job,
|
||||
job_row_number=job_row_number if job_row_number is not None else None,
|
||||
to_field=to_field,
|
||||
|
||||
Reference in New Issue
Block a user