mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-19 05:58:53 -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):
|
||||
|
||||
Reference in New Issue
Block a user