(self)
| 946 | self.assertEqual(shape.error_code, None) |
| 947 | |
| 948 | def test_exception_error_code(self): |
| 949 | shapes = { |
| 950 | 'FooException': { |
| 951 | 'exception': True, |
| 952 | 'type': 'structure', |
| 953 | 'members': {}, |
| 954 | } |
| 955 | } |
| 956 | # Test without explicit error code |
| 957 | resolver = model.ShapeResolver(shapes) |
| 958 | shape = resolver.get_shape_by_name('FooException') |
| 959 | self.assertTrue(shape.metadata['exception']) |
| 960 | self.assertEqual(shape.error_code, 'FooException') |
| 961 | # Test with explicit error code |
| 962 | shapes['FooException']['error'] = {'code': 'ExceptionCode'} |
| 963 | resolver = model.ShapeResolver(shapes) |
| 964 | shape = resolver.get_shape_by_name('FooException') |
| 965 | self.assertTrue(shape.metadata['exception']) |
| 966 | self.assertEqual(shape.error_code, 'ExceptionCode') |
| 967 | |
| 968 | def test_shape_metadata(self): |
| 969 | shapes = { |
nothing calls this directly
no test coverage detected