Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Side by Side Diff: third_party/boto/tests/unit/test_connection.py

Issue 698893003: Update checked in version of gsutil to version 4.6 (Closed) Base URL: http://dart.googlecode.com/svn/third_party/gsutil/
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved 1 # Copyright (c) 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved
2 # 2 #
3 # Permission is hereby granted, free of charge, to any person obtaining a 3 # Permission is hereby granted, free of charge, to any person obtaining a
4 # copy of this software and associated documentation files (the 4 # copy of this software and associated documentation files (the
5 # "Software"), to deal in the Software without restriction, including 5 # "Software"), to deal in the Software without restriction, including
6 # without limitation the rights to use, copy, modify, merge, publish, dis- 6 # without limitation the rights to use, copy, modify, merge, publish, dis-
7 # tribute, sublicense, and/or sell copies of the Software, and to permit 7 # tribute, sublicense, and/or sell copies of the Software, and to permit
8 # persons to whom the Software is furnished to do so, subject to the fol- 8 # persons to whom the Software is furnished to do so, subject to the fol-
9 # lowing conditions: 9 # lowing conditions:
10 # 10 #
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 APIVersion = '2012-01-01' 75 APIVersion = '2012-01-01'
76 def _required_auth_capability(self): 76 def _required_auth_capability(self):
77 return ['sign-v2'] 77 return ['sign-v2']
78 78
79 def __init__(self, aws_access_key_id=None, aws_secret_access_key=None, 79 def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,
80 is_secure=True, host=None, port=None, 80 is_secure=True, host=None, port=None,
81 proxy=None, proxy_port=None, 81 proxy=None, proxy_port=None,
82 proxy_user=None, proxy_pass=None, debug=0, 82 proxy_user=None, proxy_pass=None, debug=0,
83 https_connection_factory=None, region=None, path='/', 83 https_connection_factory=None, region=None, path='/',
84 api_version=None, security_token=None, 84 api_version=None, security_token=None,
85 validate_certs=True): 85 validate_certs=True, profile_name=None):
86 self.region = region 86 self.region = region
87 if host is None: 87 if host is None:
88 host = self.region.endpoint 88 host = self.region.endpoint
89 AWSQueryConnection.__init__(self, aws_access_key_id, 89 AWSQueryConnection.__init__(self, aws_access_key_id,
90 aws_secret_access_key, 90 aws_secret_access_key,
91 is_secure, port, proxy, proxy_port, 91 is_secure, port, proxy, proxy_port,
92 proxy_user, proxy_pass, 92 proxy_user, proxy_pass,
93 host, debug, 93 host, debug,
94 https_connection_factory, path, 94 https_connection_factory, path,
95 security_token, 95 security_token,
96 validate_certs=validate_certs) 96 validate_certs=validate_certs,
97 profile_name=profile_name)
97 98
98 class TestAWSAuthConnection(unittest.TestCase): 99 class TestAWSAuthConnection(unittest.TestCase):
99 def test_get_path(self): 100 def test_get_path(self):
100 conn = AWSAuthConnection( 101 conn = AWSAuthConnection(
101 'mockservice.cc-zone-1.amazonaws.com', 102 'mockservice.cc-zone-1.amazonaws.com',
102 aws_access_key_id='access_key', 103 aws_access_key_id='access_key',
103 aws_secret_access_key='secret', 104 aws_secret_access_key='secret',
104 suppress_consec_slashes=False 105 suppress_consec_slashes=False
105 ) 106 )
106 # Test some sample paths for mangling. 107 # Test some sample paths for mangling.
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 436
436 conn = self.region.connect(aws_access_key_id='access_key', 437 conn = self.region.connect(aws_access_key_id='access_key',
437 aws_secret_access_key='secret') 438 aws_secret_access_key='secret')
438 with self.assertRaises(BotoServerError): 439 with self.assertRaises(BotoServerError):
439 resp = conn.get_status('getStatus', 440 resp = conn.get_status('getStatus',
440 {'par1': 'foo', 'par2': 'baz'}, 441 {'par1': 'foo', 'par2': 'baz'},
441 'status') 442 'status')
442 443
443 if __name__ == '__main__': 444 if __name__ == '__main__':
444 unittest.main() 445 unittest.main()
OLDNEW
« no previous file with comments | « third_party/boto/tests/unit/swf/test_layer2_base.py ('k') | third_party/boto/tests/unit/test_endpoints.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698