Update utils to 12.0.0

Includes:

- [x] https://github.com/alphagov/notifications-utils/pull/94 (breaking
      changes which are responsible for all the changes to the API in
      this PR)

The test for `get_sms_fragment_count` has been removed because this
method is already tested in utils here:

ac20f7e99e/tests/test_base_template.py (L140-L159)
This commit is contained in:
Chris Hill-Scott
2016-12-09 15:56:25 +00:00
parent 4f9b295a5b
commit 59af44d7ab
14 changed files with 70 additions and 99 deletions

View File

@@ -42,8 +42,6 @@ from app.dao.notifications_dao import (
dao_timeout_notifications,
get_financial_year)
from notifications_utils.template import get_sms_fragment_count
from tests.app.conftest import (sample_notification, sample_template, sample_email_template, sample_service, sample_job,
sample_api_key)
@@ -821,22 +819,6 @@ def test_should_limit_notifications_return_by_day_limit_plus_one(notify_db, noti
assert len(all_notifications) == 2
@pytest.mark.parametrize(
"char_count, expected_sms_fragment_count",
[
(159, 1),
(160, 1),
(161, 2),
(306, 2),
(307, 3),
(459, 3),
(460, 4),
(461, 4)
])
def test_sms_fragment_count(char_count, expected_sms_fragment_count):
assert get_sms_fragment_count(char_count) == expected_sms_fragment_count
def test_creating_notification_adds_to_notification_history(sample_template):
data = _notification_json(sample_template)
notification = Notification(**data)