mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-18 21:48:49 -04:00
Removed one more utils reference in the README and fixed directory name
Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
This commit is contained in:
19
tests/notifications_utils/test_take.py
Normal file
19
tests/notifications_utils/test_take.py
Normal 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")
|
||||
Reference in New Issue
Block a user