(self)
| 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 = { |
nothing calls this directly
no test coverage detected