def test_send_sms_and_email_via_api(profile, client):
    notification_id = send_notification_via_api(client, profile.sms_template_id, profile.mobile, 'sms')
    notification = retry_call(
        get_notification_by_id_via_api,
        fargs=[client, notification_id, 'delivered'],
        tries=Config.PROVIDER_RETRY_TIMES,
        delay=Config.PROVIDER_RETRY_INTERVAL
    )
    assert_notification_body(notification_id, notification)
Beispiel #2
0
def test_provider_email_delivery_via_api(client):
    notification_id = send_notification_via_api(
        client, config['service']['templates']['email'],
        config['user']['email'], 'email')
    notification = retry_call(
        get_notification_by_id_via_api,
        fargs=[client, notification_id, NotificationStatuses.DELIVERED],
        tries=config['provider_retry_times'],
        delay=config['provider_retry_interval'])
    assert_notification_body(notification_id, notification)
def test_send_sms_and_email_via_api(profile, client):
    notification_id = send_notification_via_api(client, profile.email_template_id, profile.email, 'email')

    notification = retry_call(
        get_notification_by_id_via_api,
        fargs=[client, notification_id, ['sending', 'delivered']],
        tries=Config.NOTIFICATION_RETRY_TIMES,
        delay=Config.NOTIFICATION_RETRY_INTERVAL
    )
    assert_notification_body(notification_id, notification)
def test_send_sms_notification_via_api(client):
    notification_id = send_notification_via_api(
        client, config['service']['templates']['sms'],
        config['user']['mobile'], 'sms')

    notification = retry_call(
        get_notification_by_id_via_api,
        fargs=[client, notification_id, NotificationStatuses.SENT],
        tries=config['notification_retry_times'],
        delay=config['notification_retry_interval'])
    assert_notification_body(notification_id, notification)
Beispiel #5
0
def test_send_letter_notification_via_api(seeded_client_using_test_key):
    notification_id = send_notification_via_api(
        seeded_client_using_test_key, config['service']['templates']['letter'],
        config['letter_contact_data'], 'letter')

    notification = retry_call(get_notification_by_id_via_api,
                              fargs=[
                                  seeded_client_using_test_key,
                                  notification_id,
                                  NotificationStatuses.RECEIVED
                              ],
                              tries=config['notification_retry_times'],
                              delay=config['notification_retry_interval'])
    assert_notification_body(notification_id, notification)