def test_non_default_param_description(self):
     description = 'This is a custom description'
     self.param = AutoPopulatedParam(self.name, description)
     section = self.doc_structure.add_new_section(self.name)
     section.add_new_section('param-documentation')
     self.param.document_auto_populated_param('docs.request-params',
                                              self.doc_structure)
     self.assert_contains_line(description)
示例#2
0
    ('before-parameter-build.s3.GetObject', sse_md5),
    ('before-parameter-build.s3.PutObject', sse_md5),
    ('before-parameter-build.s3.CopyObject', sse_md5),
    ('before-parameter-build.s3.CreateMultipartUpload', sse_md5),
    ('before-parameter-build.s3.UploadPart', sse_md5),
    ('before-parameter-build.s3.UploadPartCopy', sse_md5),
    ('before-parameter-build.ec2.RunInstances', base64_encode_user_data),
    ('before-parameter-build.autoscaling.CreateLaunchConfiguration',
     base64_encode_user_data),
    ('before-parameter-build.route53', fix_route53_ids),
    ('before-parameter-build.glacier', inject_account_id),

    # Glacier documentation customizations
    ('docs.*.glacier.*.complete-section',
     AutoPopulatedParam(
         'accountId', 'Note: this parameter is set to "-" by \
                         default if no value is not specified.').
     document_auto_populated_param),
    ('docs.*.glacier.*.complete-section',
     AutoPopulatedParam('checksum').document_auto_populated_param),
    # UserData base64 encoding documentation customizations
    ('docs.*.ec2.RunInstances.complete-section', document_base64_encoding()),
    ('docs.*.autoscaling.CreateLaunchConfiguration.complete-section',
     document_base64_encoding()),
    # EC2 CopySnapshot documentation customizations
    ('docs.*.ec2.CopySnapshot.complete-section',
     AutoPopulatedParam('PresignedUrl').document_auto_populated_param),
    ('docs.*.ec2.CopySnapshot.complete-section',
     AutoPopulatedParam('DestinationRegion').document_auto_populated_param),
    # S3 SSE documentation modifications
    ('docs.*.s3.*.complete-section',
     AutoPopulatedParam('SSECustomerKeyMD5').document_auto_populated_param),
 def setUp(self):
     super(TestAutopopulatedParam, self).setUp()
     self.name = 'MyMember'
     self.param = AutoPopulatedParam(self.name)