Localize notification_utils to the admin

This changeset pulls in all of the notification_utils code directly into the admin and removes it as an external dependency. We are doing this to cut down on operational maintenance of the project and will begin removing parts of it no longer needed for the admin.

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
This commit is contained in:
Carlo Costino
2024-05-16 10:37:37 -04:00
parent 6bab682edd
commit 9a83ba7475
122 changed files with 49925 additions and 268 deletions

View File

@@ -0,0 +1,19 @@
from notifications_utils.take import Take
def _uppercase(value):
return value.upper()
def _append(value, to_append):
return value + to_append
def _prepend_with_service_name(value, service_name=None):
return "{}: {}".format(service_name, value)
def test_take():
assert "Service name: HELLO WORLD!" == Take("hello world").then(_uppercase).then(
_append, "!"
).then(_prepend_with_service_name, service_name="Service name")