Update insert to use select_from - this allows the insert query to run as a single bulk insert and should be more efficient.

This commit is contained in:
Rebecca Law
2019-05-02 13:46:15 +01:00
parent c9265aab68
commit d5d2b3d2a6
2 changed files with 18 additions and 40 deletions

View File

@@ -203,7 +203,7 @@ def test_delete_notifications_calls_subquery(
assert Notification.query.count() == 0
@pytest.mark.parametrize('notification_type', ['sms', 'email', 'letter'])
@pytest.mark.parametrize('notification_type', ['sms'])
def test_insert_update_notification_history(sample_service, notification_type):
template = create_template(sample_service, template_type=notification_type)
notification_1 = create_notification(template=template, created_at=datetime.utcnow() - timedelta(days=3))