mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 22:40:31 -04:00
Add two-way messaging view
> Once an inbound message has been received, there should be a way to > see the other messages in the system from the same service to the same > number. Both in and outbound. Nice inbox/whatsapp stylee view or some > such. This way the context of the reply is understood. > > Initially will only see the outbound template, not the actual message, > but we’re going to change this for the rest (soon), so that you can > always see the full message for all outbound.
This commit is contained in:
@@ -1096,6 +1096,22 @@ def mock_get_notifications(mocker, api_user_active):
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_get_notification(mocker, api_user_active):
|
||||
def _get_notification(
|
||||
service_id,
|
||||
notification_id,
|
||||
):
|
||||
return single_notification_json(
|
||||
service_id,
|
||||
)
|
||||
|
||||
return mocker.patch(
|
||||
'app.notification_api_client.get_notification',
|
||||
side_effect=_get_notification
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_get_notifications_with_previous_next(mocker):
|
||||
def _get_notifications(service_id,
|
||||
@@ -1138,11 +1154,13 @@ def mock_get_notifications_with_no_notifications(mocker):
|
||||
def mock_get_inbound_sms(mocker):
|
||||
def _get_inbound_sms(
|
||||
service_id,
|
||||
user_number=None,
|
||||
):
|
||||
return [{
|
||||
'user_number': '0790090000' + str(i),
|
||||
'content': 'message-{}'.format(index + 1),
|
||||
'created_at': (datetime.utcnow() - timedelta(minutes=60 * (i + 1))).isoformat()
|
||||
'created_at': (datetime.utcnow() - timedelta(minutes=60 * (i + 1), seconds=index)).isoformat(),
|
||||
'id': sample_uuid(),
|
||||
} for index, i in enumerate([0, 0, 0, 2, 4, 6, 8, 8])]
|
||||
|
||||
return mocker.patch(
|
||||
|
||||
Reference in New Issue
Block a user