class TestAppendParamDocumentation(BaseDocsTest): def setUp(self): super(TestAppendParamDocumentation, self).setUp() self.name = 'MyMember' self.param = AppendParamDocumentation(self.name, 'hello!') def test_appends_documentation(self): section = self.doc_structure.add_new_section(self.name) param_section = section.add_new_section('param-documentation') param_section.writeln('foo') self.param.append_documentation('docs.request-params', self.doc_structure) self.assert_contains_line('foo\n') self.assert_contains_line('hello!')
class TestAppendParamDocumentation(BaseDocsTest): def setUp(self): super(TestAppendParamDocumentation, self).setUp() self.name = 'MyMember' self.param = AppendParamDocumentation(self.name, 'hello!') def test_appends_documentation(self): section = self.doc_structure.add_new_section(self.name) param_section = section.add_new_section('param-documentation') param_section.writeln('foo') self.param.append_documentation( 'docs.request-params', self.doc_structure) self.assert_contains_line('foo\n') self.assert_contains_line('hello!')
def document_glacier_tree_hash_checksum(): doc = ''' This is a required field. Ideally you will want to compute this value with checksums from previous uploaded parts, using the algorithm described in `Glacier documentation <http://docs.aws.amazon.com/amazonglacier/latest/dev/checksum-calculations.html>`_. But if you prefer, you can also use botocore.utils.calculate_tree_hash() to compute it from raw file by:: checksum = calculate_tree_hash(open('your_file.txt', 'rb')) ''' return AppendParamDocumentation('checksum', doc).append_documentation
def document_base64_encoding(): description = ('**This value will be base64 encoded automatically. Do ' 'not base64 encode this value prior to performing the ' 'operation.**') append = AppendParamDocumentation('UserData', description) return append.append_documentation
def setUp(self): super(TestAppendParamDocumentation, self).setUp() self.name = 'MyMember' self.param = AppendParamDocumentation(self.name, 'hello!')
def document_base64_encoding(): description = 'UserData will be automatically base64 encoded if necessary.' append = AppendParamDocumentation('UserData', description) return append.append_documentation