mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 18:01:08 -05:00
Fixed ordering of the notifications test
- was backwards
This commit is contained in:
@@ -261,7 +261,8 @@ def sample_notification(notify_db,
|
||||
notify_db_session,
|
||||
service=None,
|
||||
template=None,
|
||||
job=None):
|
||||
job=None,
|
||||
to_field=None):
|
||||
if service is None:
|
||||
service = sample_service(notify_db, notify_db_session)
|
||||
if template is None:
|
||||
@@ -270,7 +271,11 @@ def sample_notification(notify_db,
|
||||
job = sample_job(notify_db, notify_db_session, service=service, template=template)
|
||||
|
||||
notification_id = uuid.uuid4()
|
||||
to = '+44709123456'
|
||||
|
||||
if to_field:
|
||||
to = to_field
|
||||
else:
|
||||
to = '+44709123456'
|
||||
|
||||
data = {
|
||||
'id': notification_id,
|
||||
|
||||
@@ -126,10 +126,11 @@ def test_get_all_notifications_for_job_in_order(notify_api, notify_db, notify_db
|
||||
with notify_api.test_client() as client:
|
||||
main_job = sample_job(notify_db, notify_db_session, service=sample_service)
|
||||
another_job = sample_job(notify_db, notify_db_session, service=sample_service)
|
||||
from time import sleep
|
||||
|
||||
notification_1 = sample_notification(notify_db, notify_db_session, job=main_job)
|
||||
notification_2 = sample_notification(notify_db, notify_db_session, job=main_job)
|
||||
notification_3 = sample_notification(notify_db, notify_db_session, job=main_job)
|
||||
notification_1 = sample_notification(notify_db, notify_db_session, job=main_job, to_field="1")
|
||||
notification_2 = sample_notification(notify_db, notify_db_session, job=main_job, to_field="2")
|
||||
notification_3 = sample_notification(notify_db, notify_db_session, job=main_job, to_field="3")
|
||||
sample_notification(notify_db, notify_db_session, job=another_job)
|
||||
|
||||
auth_header = create_authorization_header(
|
||||
|
||||
Reference in New Issue
Block a user