mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
add test that if we have an exception, nothing is committed
This commit is contained in:
@@ -30,3 +30,12 @@ def create_authorization_header(service_id=None, key_type=KEY_TYPE_NORMAL):
|
||||
|
||||
token = create_jwt_token(secret=secret, client_id=client_id)
|
||||
return 'Authorization', 'Bearer {}'.format(token)
|
||||
|
||||
|
||||
def unwrap_function(fn):
|
||||
"""
|
||||
Given a function, returns its undecorated original.
|
||||
"""
|
||||
while hasattr(fn, '__wrapped__'):
|
||||
fn = fn.__wrapped__
|
||||
return fn
|
||||
|
||||
Reference in New Issue
Block a user