summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlex Howard Whitaker <a.howardwhitake@ocado.com>2014-07-17 14:39:41 +0100
committerAlex Howard Whitaker <a.howardwhitake@ocado.com>2014-07-17 14:39:41 +0100
commitf5b27769a46e99b693586ee9dac48bc3e2e250a6 (patch)
tree9e3e4f0975f75d5c3a6afcead75a52d4ff8950e5 /tests
parent429ebbd12e92412139881b8651fb6fd8878293df (diff)
downloadboto-f5b27769a46e99b693586ee9dac48bc3e2e250a6.tar.gz
Created simple unit tests for the 2 credential report APIs
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/iam/test_connection.py41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/unit/iam/test_connection.py b/tests/unit/iam/test_connection.py
index fd568556..9c0a9669 100644
--- a/tests/unit/iam/test_connection.py
+++ b/tests/unit/iam/test_connection.py
@@ -312,3 +312,44 @@ class TestGetSigninURL(AWSMockServiceTestCase):
with self.assertRaises(Exception):
self.service_connection.get_signin_url()
+
+
+class TestGenerateCredentialReport(AWSMockServiceTestCase):
+ connection_class = IAMConnection
+
+ def default_body(self):
+ return b"""
+ <GenerateCredentialReportResponse>
+ <GenerateCredentialReportResult>
+ <State>COMPLETE</State>
+ </GenerateCredentialReportResult>
+ <ResponseMetadata>
+ <RequestId>b62e22a3-0da1-11e4-ba55-0990EXAMPLE</RequestId>
+ </ResponseMetadata>
+ </GenerateCredentialReportResponse>
+ """
+
+ def test_generate_credential_report(self):
+ self.set_http_response(status_code=200)
+ self.service_connection.generate_credential_report()
+
+
+class TestGetCredentialReport(AWSMockServiceTestCase):
+ connection_class = IAMConnection
+
+ def default_body(self):
+ return b"""
+ <GetCredentialReportResponse>
+ <ResponseMetadata>
+ <RequestId>99e60e9a-0db5-11e4-94d4-b764EXAMPLE</RequestId>
+ </ResponseMetadata>
+ <GetCredentialReportResult>
+ <Content>BASE64BLOB</Content>
+ <ReportFormat>text/csv</ReportFormat>
+ <GeneratedTime>2014-07-17T11:09:11Z</GeneratedTime>
+ </GetCredentialReportResult>
+ </GetCredentialReportResponse>
+ """
+ def test_get_credential_report(self):
+ self.set_http_response(status_code=200)
+ self.service_connection.get_credential_report()