Created
July 16, 2018 16:02
-
-
Save tseaver/8fc69f3c86df400e97d1c80ff8677877 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# System test for 'Blob.generate_signed_url' w/ non-ASCII blob name. | |
def test_create_signed_read_url_w_non_ascii_name(self): | |
blob = self.bucket.blob(u'Caf\xe9.txt') | |
payload = b'Test signed URL for blob w/ non-ASCII name' | |
blob.upload_from_string(payload) | |
self.case_blobs_to_delete.append(blob) | |
expiration = int(time.time() + 10) | |
signed_url = blob.generate_signed_url(expiration, method='GET', | |
client=Config.CLIENT) | |
response = requests.get(signed_url) | |
self.assertEqual(response.status_code, 200) | |
self.assertEqual(response.content, payload) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment