mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-10 01:56:03 -04:00
Small updates:
* Make config use new provider sms template id * create_notification to account for created status * Small robustness addition to test
This commit is contained in:
@@ -240,7 +240,7 @@ class Live(Config):
|
|||||||
STATSD_ENABLED = True
|
STATSD_ENABLED = True
|
||||||
FROM_NUMBER = '40604'
|
FROM_NUMBER = '40604'
|
||||||
FUNCTIONAL_TEST_PROVIDER_SERVICE_ID = '6c1d81bb-dae2-4ee9-80b0-89a4aae9f649'
|
FUNCTIONAL_TEST_PROVIDER_SERVICE_ID = '6c1d81bb-dae2-4ee9-80b0-89a4aae9f649'
|
||||||
FUNCTIONAL_TEST_PROVIDER_SMS_TEMPLATE_ID = '285bb62d-08e7-414b-b5a3-6372ba320e06'
|
FUNCTIONAL_TEST_PROVIDER_SMS_TEMPLATE_ID = 'ba9e1789-a804-40b8-871f-cc60d4c1286f'
|
||||||
|
|
||||||
|
|
||||||
class CloudFoundryConfig(Config):
|
class CloudFoundryConfig(Config):
|
||||||
|
|||||||
@@ -1514,7 +1514,7 @@ def test_slow_provider_delivery_returns_for_delivered_notifications_only(
|
|||||||
slow_delivery = is_delivery_slow_for_provider(
|
slow_delivery = is_delivery_slow_for_provider(
|
||||||
sent_at=now,
|
sent_at=now,
|
||||||
provider='firetext',
|
provider='firetext',
|
||||||
threshold=1,
|
threshold=2,
|
||||||
delivery_time=timedelta(minutes=5),
|
delivery_time=timedelta(minutes=5),
|
||||||
service_id=sample_template.service.id,
|
service_id=sample_template.service.id,
|
||||||
template_id=sample_template.id
|
template_id=sample_template.id
|
||||||
|
|||||||
@@ -75,11 +75,9 @@ def create_notification(
|
|||||||
if created_at is None:
|
if created_at is None:
|
||||||
created_at = datetime.utcnow()
|
created_at = datetime.utcnow()
|
||||||
|
|
||||||
if sent_at is None:
|
if status != 'created':
|
||||||
sent_at = datetime.utcnow()
|
sent_at = sent_at or datetime.utcnow()
|
||||||
|
updated_at = updated_at or datetime.utcnow()
|
||||||
if updated_at is None:
|
|
||||||
updated_at = datetime.utcnow()
|
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
'id': uuid.uuid4(),
|
'id': uuid.uuid4(),
|
||||||
|
|||||||
Reference in New Issue
Block a user