mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 18:01:08 -05:00
Reorder the migrations.
This commit is contained in:
@@ -38,7 +38,7 @@ def receive_mmg_sms():
|
||||
# succesfully
|
||||
return 'RECEIVED', 200
|
||||
|
||||
statsd_client.incr('inbound.mmg.succesful')
|
||||
statsd_client.incr('inbound.mmg.successful')
|
||||
|
||||
service = potential_services[0]
|
||||
|
||||
@@ -100,7 +100,7 @@ def receive_firetext_sms():
|
||||
|
||||
service = potential_services[0]
|
||||
|
||||
user_number = normalise_phone_number(post_data['source'])
|
||||
user_number = validate_and_format_phone_number(post_data['source'], international=True)
|
||||
message = post_data['message']
|
||||
timestamp = post_data['time']
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 0091_add_inbound_provider
|
||||
Revises: 0090_inbound_sms
|
||||
Revision ID: 0092_add_inbound_provider
|
||||
Revises: 0091_letter_billing
|
||||
Create Date: 2017-06-02 16:07:35.445423
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '0091_add_inbound_provider'
|
||||
down_revision = '0090_inbound_sms'
|
||||
revision = '0092_add_inbound_provider'
|
||||
down_revision = '0091_letter_billing'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
@@ -1,14 +1,14 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 0092_populate_inbound_provider
|
||||
Revises: 0091_add_inbound_provider
|
||||
Revision ID: 0093_populate_inbound_provider
|
||||
Revises: 0092_add_inbound_provider
|
||||
Create Date: 2017-05-22 10:23:43.939050
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '0092_populate_inbound_provider'
|
||||
down_revision = '0091_add_inbound_provider'
|
||||
revision = '0093_populate_inbound_provider'
|
||||
down_revision = '0092_add_inbound_provider'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
@@ -116,7 +116,7 @@ def test_receive_notification_returns_received_to_firetext(notify_db_session, cl
|
||||
|
||||
|
||||
def test_receive_notification_from_firetext_persists_message(notify_db_session, client, mocker):
|
||||
mock = mocker.patch('app.notifications.receive_notifications.statsd_client.incr')
|
||||
mocker.patch('app.notifications.receive_notifications.statsd_client.incr')
|
||||
|
||||
service = create_service(service_name='b', sms_sender='07111111111')
|
||||
|
||||
@@ -134,7 +134,7 @@ def test_receive_notification_from_firetext_persists_message(notify_db_session,
|
||||
|
||||
assert result['status'] == 'ok'
|
||||
assert persisted.notify_number == '07111111111'
|
||||
assert persisted.user_number == '7999999999'
|
||||
assert persisted.user_number == '447999999999'
|
||||
assert persisted.service == service
|
||||
assert persisted.content == 'this is a message'
|
||||
assert persisted.provider == 'firetext'
|
||||
|
||||
Reference in New Issue
Block a user