Skip to content
This repository was archived by the owner on Oct 2, 2023. It is now read-only.

Commit 8ca207b

Browse files
author
Grace Yim
committed
Add process_postback test for keys with empty values
1 parent ddf9271 commit 8ca207b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/test_toopher_iframe.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,13 @@ def test_process_postback_good_signature_without_request_token_returns_authentic
125125
auth_request = self.iframe_api.process_postback(self._get_urlencoded_auth_request_postback_data())
126126
self.assertEqual(type(auth_request), toopher.AuthenticationRequest)
127127

128+
def test_process_postback_with_key_with_empty_value_returns_authentication_request(self):
129+
auth_data = self._get_auth_request_postback_data_as_dict()
130+
auth_data['requester_metadata'] = ''
131+
auth_data['toopher_sig'] = '2CQouLu8dL3OA8N/mgHK6eeYHm4='
132+
auth_request = self.iframe_api.process_postback(urllib.urlencode(auth_data))
133+
self.assertEqual(type(auth_request), toopher.AuthenticationRequest)
134+
128135
def test_process_postback_bad_signature_fails(self):
129136
data = self._get_auth_request_postback_data_as_dict()
130137
data['toopher_sig'] = 'invalid'

0 commit comments

Comments
 (0)