Changed styling

This commit is contained in:
Rebecca Law
2017-04-07 14:36:00 +01:00
parent 5a810a47ac
commit 2d9a449d1e
5 changed files with 23 additions and 23 deletions
+6 -6
View File
@@ -444,12 +444,12 @@ def is_delivery_slow_for_provider(
@statsd(namespace="dao") @statsd(namespace="dao")
@transactional @transactional
def dao_update_notifications_sent_to_dvla(job_id, provider): def dao_update_notifications_sent_to_dvla(job_id, provider):
updated_count = db.session.query(Notification updated_count = db.session.query(
).filter(Notification.job_id == job_id Notification).filter(Notification.job_id == job_id).update(
).update({'status': 'sending', "sent_by": provider}) {'status': 'sending', "sent_by": provider})
db.session.query(NotificationHistory db.session.query(
).filter(NotificationHistory.job_id == job_id NotificationHistory).filter(NotificationHistory.job_id == job_id).update(
).update({'status': 'sending', "sent_by": provider}) {'status': 'sending', "sent_by": provider})
return updated_count return updated_count
+2 -2
View File
@@ -283,8 +283,8 @@ class JobSchema(BaseSchema):
job_status = field_for(models.JobStatus, 'name', required=False) job_status = field_for(models.JobStatus, 'name', required=False)
scheduled_for = fields.DateTime() scheduled_for = fields.DateTime()
service_name = fields.Nested(ServiceSchema, attribute="service", dump_to="service_name", only=["name"], service_name = fields.Nested(
dump_only=True) ServiceSchema, attribute="service", dump_to="service_name", only=["name"], dump_only=True)
@validates('scheduled_for') @validates('scheduled_for')
def validate_scheduled_for(self, value): def validate_scheduled_for(self, value):
+2 -2
View File
@@ -1571,8 +1571,8 @@ def test_dao_update_notifications_sent_to_dvla(notify_db, notify_db_session, sam
def test_dao_update_notifications_sent_to_dvla_does_update_history_if_test_key( def test_dao_update_notifications_sent_to_dvla_does_update_history_if_test_key(
notify_db, notify_db_session, sample_letter_template, sample_api_key): notify_db, notify_db_session, sample_letter_template, sample_api_key):
job = sample_job(notify_db=notify_db, notify_db_session=notify_db_session, template=sample_letter_template) job = sample_job(notify_db=notify_db, notify_db_session=notify_db_session, template=sample_letter_template)
notification = create_notification(template=sample_letter_template, job=job, api_key_id=sample_api_key.id, notification = create_notification(
key_type='test') template=sample_letter_template, job=job, api_key_id=sample_api_key.id, key_type='test')
updated_count = dao_update_notifications_sent_to_dvla(job_id=job.id, provider='some provider') updated_count = dao_update_notifications_sent_to_dvla(job_id=job.id, provider='some provider')