def test_list_of_structures_with_triple_dots(self): list_shape = { 'type': 'list', 'member': { 'shape': 'StructShape' }, } shapes = { 'Top': list_shape, 'String': { 'type': 'string' }, 'StructShape': { 'type': 'structure', 'members': OrderedDict([ ('A', { 'shape': 'String' }), ('B', { 'shape': 'String' }), ]) } } m = model.ListShape(shape_name='Top', shape_model=list_shape, shape_resolver=model.ShapeResolver(shapes)) generated_example = self.shorthand_documenter.generate_shorthand_example( '--foo', m) self.assertIn('A=string,B=string ...', generated_example)
def test_list_of_structures_with_triple_dots(self): list_shape = { 'type': 'list', 'member': { 'shape': 'StructShape' }, } shapes = { 'Top': list_shape, 'String': { 'type': 'string' }, 'StructShape': { 'type': 'structure', 'members': OrderedDict([ ('A', { 'shape': 'String' }), ('B', { 'shape': 'String' }), ]) } } m = model.ListShape(shape_name='Top', shape_model=list_shape, shape_resolver=model.ShapeResolver(shapes)) argument = mock.Mock() argument.argument_model = m argument.name = 'foo' argument.cli_name = '--foo' generated_example = self.get_generated_example_for(argument) self.assertIn('A=string,B=string ...', generated_example)