Permalink
Browse files

Fixes #2108 GS generate_url with GoogleAccessId

  • Loading branch information...
1 parent 221085e commit e185149bcabe783d56b04d83615e7914f5170452 @daniel-vcodex daniel-vcodex committed Feb 24, 2014
Showing with 7 additions and 1 deletion.
  1. +1 −1 boto/gs/connection.py
  2. +6 −0 tests/integration/gs/test_basic.py
View
@@ -32,7 +32,7 @@ class Location(object):
class GSConnection(S3Connection):
DefaultHost = 'storage.googleapis.com'
- QueryString = 'Signature=%s&Expires=%d&AWSAccessKeyId=%s'
+ QueryString = 'Signature=%s&Expires=%d&GoogleAccessId=%s'
def __init__(self, gs_access_key_id=None, gs_secret_access_key=None,
is_secure=True, port=None, proxy=None, proxy_port=None,
@@ -31,6 +31,7 @@
import os
import re
import StringIO
+import urllib
import xml.sax
from boto import handler
@@ -99,6 +100,11 @@ def test_read_write(self):
# check to make sure content read from gcs is identical to original
self.assertEqual(s1, fp.read())
fp.close()
+ # Use generate_url to get the contents
+ url = self._conn.generate_url(900, 'GET', bucket=bucket.name, key=key_name)
+ f = urllib.urlopen(url)
+ self.assertEqual(s1, f.read())
+ f.close()
# check to make sure set_contents_from_file is working
sfp = StringIO.StringIO('foo')
k.set_contents_from_file(sfp)

0 comments on commit e185149

Please sign in to comment.