From e29546cb6541beaaaa034f6d66c3707d84b892a8 Mon Sep 17 00:00:00 2001 From: Leo Hemsted Date: Mon, 11 Nov 2019 16:07:18 +0000 Subject: [PATCH] flake8 --- app/dao/notifications_dao.py | 2 -- app/dao/provider_details_dao.py | 6 +----- tests/app/celery/test_scheduled_tasks.py | 2 -- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/app/dao/notifications_dao.py b/app/dao/notifications_dao.py index ddab42d65..fb195cab8 100644 --- a/app/dao/notifications_dao.py +++ b/app/dao/notifications_dao.py @@ -530,8 +530,6 @@ def is_delivery_slow_for_providers( ProviderDetails.identifier, "slow" ) - print(slow_notification_counts) - print([x for x in slow_notification_counts]) slow_providers = {} for provider, rows in groupby(slow_notification_counts, key=attrgetter('identifier')): diff --git a/app/dao/provider_details_dao.py b/app/dao/provider_details_dao.py index 96ccc5d6a..ffa50c23e 100644 --- a/app/dao/provider_details_dao.py +++ b/app/dao/provider_details_dao.py @@ -4,11 +4,6 @@ from notifications_utils.timezones import convert_utc_to_bst from sqlalchemy import asc, desc, func from app.dao.dao_utils import transactional -from app.provider_details.switch_providers import ( - provider_is_inactive, - provider_is_primary, - switch_providers -) from app.models import FactBilling, ProviderDetails, ProviderDetailsHistory, SMS_TYPE, User from app import db @@ -52,6 +47,7 @@ def dao_reduce_sms_provider_priority(identifier): providers[identifier].priority = max(0, providers[identifier].priority - 10) providers[other].priority = min(100, providers[other].priority + 10) + def get_provider_details_by_notification_type(notification_type, supports_international=False): filters = [ProviderDetails.notification_type == notification_type] diff --git a/tests/app/celery/test_scheduled_tasks.py b/tests/app/celery/test_scheduled_tasks.py index 6d3ecaf0f..0c35c32fe 100644 --- a/tests/app/celery/test_scheduled_tasks.py +++ b/tests/app/celery/test_scheduled_tasks.py @@ -5,7 +5,6 @@ import pytest from freezegun import freeze_time from mock import mock -from app import db from app.celery import scheduled_tasks from app.celery.scheduled_tasks import ( check_job_status, @@ -13,7 +12,6 @@ from app.celery.scheduled_tasks import ( delete_verify_codes, run_scheduled_jobs, send_scheduled_notifications, - switch_current_sms_provider_on_slow_delivery, replay_created_notifications, check_precompiled_letter_state, check_templated_letter_state,