mirror of
https://github.com/GSA/notifications-api.git
synced 2026-07-10 03:14:19 -04:00
Remove the archived table template_statistics. The last time the table we updated was August 30 2016, it's safe to say we are done with it.
I updated the InboundSms and TemplateRedacted model to include an index in the db. Dropped service_permissions.updated_at column since we are not auditting the table
This commit is contained in:
@@ -11,7 +11,6 @@ from app.models import (
|
||||
NotificationHistory,
|
||||
Job,
|
||||
NotificationStatistics,
|
||||
TemplateStatistics,
|
||||
ScheduledNotification,
|
||||
NOTIFICATION_STATUS_TYPES,
|
||||
NOTIFICATION_STATUS_TYPES_FAILED,
|
||||
@@ -590,7 +589,6 @@ def test_create_notification_creates_notification_with_personalisation(notify_db
|
||||
sample_job, mmg_provider):
|
||||
assert Notification.query.count() == 0
|
||||
assert NotificationStatistics.query.count() == 0
|
||||
assert TemplateStatistics.query.count() == 0
|
||||
|
||||
data = sample_notification(notify_db=notify_db, notify_db_session=notify_db_session,
|
||||
template=sample_template_with_placeholders,
|
||||
@@ -614,7 +612,6 @@ def test_create_notification_creates_notification_with_personalisation(notify_db
|
||||
def test_save_notification_creates_sms(sample_template, sample_job, mmg_provider):
|
||||
assert Notification.query.count() == 0
|
||||
assert NotificationStatistics.query.count() == 0
|
||||
assert TemplateStatistics.query.count() == 0
|
||||
|
||||
data = _notification_json(sample_template, job_id=sample_job.id)
|
||||
|
||||
@@ -633,10 +630,9 @@ def test_save_notification_creates_sms(sample_template, sample_job, mmg_provider
|
||||
assert notification_from_db.status == 'created'
|
||||
|
||||
|
||||
def test_save_notification_and_create_email(sample_email_template, sample_job, ses_provider):
|
||||
def test_save_notification_and_create_email(sample_email_template, sample_job):
|
||||
assert Notification.query.count() == 0
|
||||
assert NotificationStatistics.query.count() == 0
|
||||
assert TemplateStatistics.query.count() == 0
|
||||
|
||||
data = _notification_json(sample_email_template, job_id=sample_job.id)
|
||||
|
||||
@@ -761,7 +757,6 @@ def test_not_save_notification_and_not_create_stats_on_commit_error(sample_templ
|
||||
assert Notification.query.count() == 0
|
||||
assert Job.query.get(sample_job.id).notifications_sent == 0
|
||||
assert NotificationStatistics.query.count() == 0
|
||||
assert TemplateStatistics.query.count() == 0
|
||||
|
||||
|
||||
def test_save_notification_and_increment_job(sample_template, sample_job, mmg_provider):
|
||||
|
||||
@@ -32,7 +32,6 @@ from app.dao.service_permissions_dao import dao_add_service_permission, dao_remo
|
||||
from app.dao.users_dao import save_model_user
|
||||
from app.models import (
|
||||
NotificationStatistics,
|
||||
TemplateStatistics,
|
||||
ProviderStatistics,
|
||||
VerifyCode,
|
||||
ApiKey,
|
||||
@@ -55,7 +54,6 @@ from app.models import (
|
||||
EMAIL_TYPE,
|
||||
SMS_TYPE,
|
||||
LETTER_TYPE,
|
||||
INTERNATIONAL_SMS_TYPE,
|
||||
SERVICE_PERMISSION_TYPES
|
||||
)
|
||||
|
||||
@@ -433,7 +431,6 @@ def test_delete_service_and_associated_objects(notify_db,
|
||||
|
||||
delete_service_and_all_associated_db_objects(sample_service)
|
||||
assert NotificationStatistics.query.count() == 0
|
||||
assert TemplateStatistics.query.count() == 0
|
||||
assert ProviderStatistics.query.count() == 0
|
||||
assert VerifyCode.query.count() == 0
|
||||
assert ApiKey.query.count() == 0
|
||||
|
||||
Reference in New Issue
Block a user