MCPcopy Create free account
hub / github.com/aws/aws-cli / test_bad_shape_ref

Method test_bad_shape_ref

tests/unit/botocore/test_model.py:1044–1061  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1042 resolver.get_shape_by_name('UnknownType')
1043
1044 def test_bad_shape_ref(self):
1045 # This is an example of a denormalized model,
1046 # which should raise an exception.
1047 shapes = {
1048 'Struct': {
1049 'type': 'structure',
1050 'members': {
1051 'A': {'type': 'string'},
1052 'B': {'type': 'string'},
1053 },
1054 }
1055 }
1056 resolver = model.ShapeResolver(shapes)
1057 with self.assertRaises(model.InvalidShapeReferenceError):
1058 struct = resolver.get_shape_by_name('Struct')
1059 # Resolving the members will fail because
1060 # the 'A' and 'B' members are not shape refs.
1061 struct.members
1062
1063 def test_shape_name_in_repr(self):
1064 shapes = {

Callers

nothing calls this directly

Calls 1

get_shape_by_nameMethod · 0.95

Tested by

no test coverage detected