mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-19 05:58:53 -04:00
Merge pull request #2921 from alphagov/remove-statsd-http-api-decorators
Remove statsd http api decorators and turn statsd back on for celery apps
This commit is contained in:
@@ -17,7 +17,6 @@ from app.dao.notifications_dao import (
|
||||
dao_timeout_notifications,
|
||||
dao_update_notification,
|
||||
dao_update_notifications_by_reference,
|
||||
delete_notifications_older_than_retention_by_type,
|
||||
get_notification_by_id,
|
||||
get_notification_for_job,
|
||||
get_notification_with_personalisation,
|
||||
@@ -56,20 +55,6 @@ from tests.app.db import (
|
||||
)
|
||||
|
||||
|
||||
def test_should_have_decorated_notifications_dao_functions():
|
||||
assert dao_create_notification.__wrapped__.__name__ == 'dao_create_notification' # noqa
|
||||
assert update_notification_status_by_id.__wrapped__.__name__ == 'update_notification_status_by_id' # noqa
|
||||
assert dao_update_notification.__wrapped__.__name__ == 'dao_update_notification' # noqa
|
||||
assert update_notification_status_by_reference.__wrapped__.__name__ == 'update_notification_status_by_reference' # noqa
|
||||
assert get_notification_for_job.__wrapped__.__name__ == 'get_notification_for_job' # noqa
|
||||
assert get_notifications_for_job.__wrapped__.__name__ == 'get_notifications_for_job' # noqa
|
||||
assert get_notification_with_personalisation.__wrapped__.__name__ == 'get_notification_with_personalisation' # noqa
|
||||
assert get_notifications_for_service.__wrapped__.__name__ == 'get_notifications_for_service' # noqa
|
||||
assert get_notification_by_id.__wrapped__.__name__ == 'get_notification_by_id' # noqa
|
||||
assert delete_notifications_older_than_retention_by_type.__wrapped__.__name__ == 'delete_notifications_older_than_retention_by_type' # noqa
|
||||
assert dao_delete_notifications_by_id.__wrapped__.__name__ == 'dao_delete_notifications_by_id' # noqa
|
||||
|
||||
|
||||
def test_should_by_able_to_update_status_by_reference(sample_email_template, ses_provider):
|
||||
data = _notification_json(sample_email_template, status='sending')
|
||||
|
||||
|
||||
@@ -28,10 +28,6 @@ from app.models import (
|
||||
from tests.app.db import create_job, create_service, create_template, create_notification, create_service_contact_list
|
||||
|
||||
|
||||
def test_should_have_decorated_notifications_dao_functions():
|
||||
assert dao_get_notification_outcomes_for_job.__wrapped__.__name__ == 'dao_get_notification_outcomes_for_job' # noqa
|
||||
|
||||
|
||||
def test_should_count_of_statuses_for_notifications_associated_with_job(sample_template, sample_job):
|
||||
create_notification(sample_template, job=sample_job, status='created')
|
||||
create_notification(sample_template, job=sample_job, status='created')
|
||||
|
||||
@@ -54,11 +54,6 @@ from tests.app.db import (create_annual_billing, create_api_key,
|
||||
create_template_folder, create_user)
|
||||
|
||||
|
||||
def test_should_have_decorated_services_dao_functions():
|
||||
assert dao_fetch_todays_stats_for_service.__wrapped__.__name__ == 'dao_fetch_todays_stats_for_service' # noqa
|
||||
assert dao_fetch_stats_for_service.__wrapped__.__name__ == 'dao_fetch_stats_for_service' # noqa
|
||||
|
||||
|
||||
def test_create_service(notify_db_session):
|
||||
user = create_user()
|
||||
create_letter_branding()
|
||||
|
||||
Reference in New Issue
Block a user