Merge branch 'master' into capture-delivery-outcomes

This commit is contained in:
Martyn Inglis
2016-03-18 15:35:51 +00:00
27 changed files with 550 additions and 92 deletions

View File

@@ -70,8 +70,13 @@ def test_should_be_able_to_get_statistics_for_a_service(sample_template):
assert len(stats) == 1
assert stats[0].emails_requested == 0
assert stats[0].sms_requested == 1
assert stats[0].sms_delivered == 0
assert stats[0].sms_error == 0
assert stats[0].day == notification.created_at.strftime(DATE_FORMAT)
assert stats[0].service_id == notification.service_id
assert stats[0].emails_requested == 0
assert stats[0].emails_delivered == 0
assert stats[0].emails_error == 0
def test_should_be_able_to_get_statistics_for_a_service_for_a_day(sample_template):
@@ -90,7 +95,11 @@ def test_should_be_able_to_get_statistics_for_a_service_for_a_day(sample_templat
sample_template.service.id, now.strftime(DATE_FORMAT)
)
assert stat.emails_requested == 0
assert stat.emails_error == 0
assert stat.emails_delivered == 0
assert stat.sms_requested == 1
assert stat.sms_error == 0
assert stat.sms_delivered == 0
assert stat.day == notification.created_at.strftime(DATE_FORMAT)
assert stat.service_id == notification.service_id

View File

@@ -32,6 +32,7 @@ def test_create_user(notify_api, notify_db, notify_db_session):
assert User.query.count() == 1
assert User.query.first().email_address == email
assert User.query.first().id == user.id
assert not user.platform_admin
def test_get_all_users(notify_api, notify_db, notify_db_session, sample_user):