Use encrypt/decrypt methods in place of signing

This commit is contained in:
Ryan Ahearn
2022-12-09 16:33:10 -05:00
parent 1f183b96b9
commit 17ee4c3f2b
15 changed files with 179 additions and 150 deletions

View File

@@ -154,9 +154,9 @@ def test_notification_personalisation_getter_returns_empty_dict_from_None():
assert noti.personalisation == {}
def test_notification_personalisation_getter_always_returns_empty_dict():
def test_notification_personalisation_getter_always_returns_empty_dict(notify_api):
noti = Notification()
noti._personalisation = encryption.sign({})
noti._personalisation = encryption.encrypt({})
assert noti.personalisation == {}
@@ -164,11 +164,11 @@ def test_notification_personalisation_getter_always_returns_empty_dict():
None,
{}
])
def test_notification_personalisation_setter_always_sets_empty_dict(input_value):
def test_notification_personalisation_setter_always_sets_empty_dict(notify_api, input_value):
noti = Notification()
noti.personalisation = input_value
assert noti._personalisation == encryption.sign({})
assert noti.personalisation == {}
def test_notification_subject_is_none_for_sms(sample_service):