Remove statsd decorators from dao functions

This done so that we do not use statsd on our http endpoint.
We decided we do not need metrics that this gave us. If we
change our minds, we will add Prometheus-friendly decorators
instead in the future.
This commit is contained in:
Pea Tyczynska
2020-07-07 18:02:24 +01:00
parent c3dadde505
commit 9c4205c7c6
9 changed files with 0 additions and 81 deletions

View File

@@ -56,20 +56,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')

View File

@@ -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')

View File

@@ -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()