mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-24 16:23:44 -04:00
Added research mode tasks
- if a service is in research mode the don't send the notifications via the providers (MMG/SES/etc) - instead set up a task to mimic those services callbacks - this completes the loop, and show stats, delivery receipts and so on. - Use the "to" field to choose the response, allows users to create successful and errored notifications temp fail sms, uses "07833333333" perm fail sms, uses = "07822222222" success = "07811111111" (or anything else) success email = "delivered@simulator.notify" perm fail = "perm-fail@simulator.notify" temp fail = "temp-fail@simulator.notify"
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import requests_mock
|
||||
import pytest
|
||||
from datetime import (datetime, date)
|
||||
from app import db
|
||||
@@ -23,6 +24,12 @@ from app.dao.invited_user_dao import save_invited_user
|
||||
import uuid
|
||||
|
||||
|
||||
@pytest.yield_fixture
|
||||
def rmock():
|
||||
with requests_mock.mock() as rmock:
|
||||
yield rmock
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def service_factory(notify_db, notify_db_session):
|
||||
class ServiceFactory(object):
|
||||
|
||||
Reference in New Issue
Block a user