Fix PEP issues :-|

This commit is contained in:
Imdad Ahad
2017-04-26 11:52:03 +01:00
parent 014a29170c
commit 68edd7a33f

View File

@@ -170,19 +170,20 @@ def test_persist_notification_with_optionals(sample_job, sample_api_key, mocker)
n_id = uuid.uuid4() n_id = uuid.uuid4()
created_at = datetime.datetime(2016, 11, 11, 16, 8, 18) created_at = datetime.datetime(2016, 11, 11, 16, 8, 18)
persist_notification( persist_notification(
template_id=sample_job.template.id, template_id=sample_job.template.id,
template_version=sample_job.template.version, template_version=sample_job.template.version,
recipient='+447111111111', recipient='+447111111111',
service=sample_job.service, service=sample_job.service,
personalisation=None, notification_type='sms', personalisation=None,
api_key_id=sample_api_key.id, notification_type='sms',
key_type=sample_api_key.key_type, api_key_id=sample_api_key.id,
created_at=created_at, key_type=sample_api_key.key_type,
job_id=sample_job.id, created_at=created_at,
job_row_number=10, job_id=sample_job.id,
client_reference="ref from client", job_row_number=10,
notification_id=n_id client_reference="ref from client",
) notification_id=n_id
)
assert Notification.query.count() == 1 assert Notification.query.count() == 1
assert NotificationHistory.query.count() == 1 assert NotificationHistory.query.count() == 1
persisted_notification = Notification.query.all()[0] persisted_notification = Notification.query.all()[0]
@@ -199,7 +200,6 @@ def test_persist_notification_with_optionals(sample_job, sample_api_key, mocker)
assert persisted_notification.rate_multiplier is None assert persisted_notification.rate_multiplier is None
@freeze_time("2016-01-01 11:09:00.061258") @freeze_time("2016-01-01 11:09:00.061258")
def test_persist_notification_increments_cache_if_key_exists(sample_template, sample_api_key, mocker): def test_persist_notification_increments_cache_if_key_exists(sample_template, sample_api_key, mocker):
mock_incr = mocker.patch('app.notifications.process_notifications.redis_store.incr') mock_incr = mocker.patch('app.notifications.process_notifications.redis_store.incr')