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

Unified Diff: third_party/boto/tests/unit/sts/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 side-by-side diff with in-line comments
Download patch
Index: third_party/boto/tests/unit/sts/test_connection.py
===================================================================
--- third_party/boto/tests/unit/sts/test_connection.py (revision 33376)
+++ third_party/boto/tests/unit/sts/test_connection.py (working copy)
@@ -81,7 +81,30 @@
self.assertEqual(response.user.arn, 'arn:role')
self.assertEqual(response.user.assume_role_id, 'roleid:myrolesession')
+ def test_assume_role_with_mfa(self):
+ self.set_http_response(status_code=200)
+ response = self.service_connection.assume_role(
+ 'arn:role',
+ 'mysession',
+ mfa_serial_number='GAHT12345678',
+ mfa_token='abc123'
+ )
+ self.assert_request_parameters(
+ {'Action': 'AssumeRole',
+ 'RoleArn': 'arn:role',
+ 'RoleSessionName': 'mysession',
+ 'SerialNumber': 'GAHT12345678',
+ 'TokenCode': 'abc123'},
+ ignore_params_values=['Timestamp', 'AWSAccessKeyId',
+ 'SignatureMethod', 'SignatureVersion',
+ 'Version'])
+ self.assertEqual(response.credentials.access_key, 'accesskey')
+ self.assertEqual(response.credentials.secret_key, 'secretkey')
+ self.assertEqual(response.credentials.session_token, 'session_token')
+ self.assertEqual(response.user.arn, 'arn:role')
+ self.assertEqual(response.user.assume_role_id, 'roleid:myrolesession')
+
class TestSTSWebIdentityConnection(AWSMockServiceTestCase):
connection_class = STSConnection
« no previous file with comments | « third_party/boto/tests/unit/sqs/test_connection.py ('k') | third_party/boto/tests/unit/swf/test_layer2_base.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698