mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
A few code style tweaks to adhere to standard for better maintainable code.
This commit is contained in:
@@ -8,7 +8,10 @@ from notifications_utils.recipients import (
|
||||
from notifications_utils.template import HTMLEmailTemplate, PlainTextEmailTemplate, SMSMessageTemplate
|
||||
|
||||
from app import clients, statsd_client, create_uuid
|
||||
from app.dao.notifications_dao import dao_update_notification, dao_get_notification_email_reply_for_notification
|
||||
from app.dao.notifications_dao import (
|
||||
dao_update_notification,
|
||||
dao_get_notification_email_reply_for_notification
|
||||
)
|
||||
from app.dao.provider_details_dao import (
|
||||
get_provider_details_by_notification_type,
|
||||
dao_toggle_sms_provider
|
||||
|
||||
@@ -1,34 +1,33 @@
|
||||
from datetime import datetime
|
||||
import uuid
|
||||
|
||||
from app import db, create_random_identifier
|
||||
from app import db
|
||||
from app.dao.jobs_dao import dao_create_job
|
||||
from app.dao.service_inbound_api_dao import save_service_inbound_api
|
||||
from app.models import (
|
||||
ApiKey,
|
||||
EMAIL_TYPE,
|
||||
SMS_TYPE,
|
||||
KEY_TYPE_NORMAL,
|
||||
Service,
|
||||
User,
|
||||
Template,
|
||||
MonthlyBilling,
|
||||
Notification,
|
||||
ScheduledNotification,
|
||||
ServicePermission,
|
||||
Rate,
|
||||
Job,
|
||||
InboundSms,
|
||||
InboundNumber,
|
||||
Job,
|
||||
MonthlyBilling,
|
||||
Notification,
|
||||
NotificationEmailReplyTo,
|
||||
Organisation,
|
||||
Rate,
|
||||
Service,
|
||||
ServiceEmailReplyTo,
|
||||
ServiceInboundApi,
|
||||
ServiceLetterContact,
|
||||
ScheduledNotification,
|
||||
ServicePermission,
|
||||
ServiceSmsSender,
|
||||
Template,
|
||||
User,
|
||||
EMAIL_TYPE,
|
||||
LETTER_TYPE,
|
||||
SMS_TYPE,
|
||||
INBOUND_SMS_TYPE,
|
||||
KEY_TYPE_NORMAL,
|
||||
ServiceInboundApi,
|
||||
ServiceEmailReplyTo,
|
||||
ServiceLetterContact, ServiceSmsSender, NotificationEmailReplyTo)
|
||||
KEY_TYPE_NORMAL
|
||||
)
|
||||
from app.dao.users_dao import save_model_user
|
||||
from app.dao.notifications_dao import dao_create_notification, dao_created_scheduled_notification
|
||||
from app.dao.templates_dao import dao_create_template
|
||||
|
||||
@@ -6,7 +6,6 @@ from unittest.mock import ANY, call
|
||||
import pytest
|
||||
from notifications_utils.recipients import validate_and_format_phone_number
|
||||
from flask import current_app
|
||||
from requests_mock import mock
|
||||
|
||||
import app
|
||||
from app import mmg_client, firetext_client
|
||||
@@ -22,10 +21,17 @@ from app.models import (
|
||||
BRANDING_ORG,
|
||||
BRANDING_GOVUK,
|
||||
BRANDING_BOTH,
|
||||
BRANDING_ORG_BANNER, NotificationEmailReplyTo)
|
||||
BRANDING_ORG_BANNER
|
||||
)
|
||||
|
||||
from tests.app.db import create_service, create_template, create_notification, create_inbound_number, \
|
||||
create_reply_to_email, create_reply_to_email_for_notification
|
||||
from tests.app.db import (
|
||||
create_service,
|
||||
create_template,
|
||||
create_notification,
|
||||
create_inbound_number,
|
||||
create_reply_to_email,
|
||||
create_reply_to_email_for_notification
|
||||
)
|
||||
|
||||
|
||||
def test_should_return_highest_priority_active_provider(restore_provider_details):
|
||||
|
||||
Reference in New Issue
Block a user