(self)
| 885 | self.assertEqual(shape.name, 'StringType') |
| 886 | |
| 887 | def test_serialization_cache(self): |
| 888 | shape_map = { |
| 889 | 'Foo': { |
| 890 | 'type': 'structure', |
| 891 | 'members': { |
| 892 | 'Baz': {'shape': 'StringType', 'locationName': 'other'}, |
| 893 | }, |
| 894 | }, |
| 895 | "StringType": {"type": "string"}, |
| 896 | } |
| 897 | resolver = model.ShapeResolver(shape_map) |
| 898 | shape = resolver.resolve_shape_ref( |
| 899 | {'shape': 'StringType', 'locationName': 'other'} |
| 900 | ) |
| 901 | self.assertEqual(shape.serialization['name'], 'other') |
| 902 | # serialization is computed on demand, and a cache is kept. |
| 903 | # This is just verifying that trying to access serialization again |
| 904 | # gives the same result. We don't actually care that it's cached, |
| 905 | # we just care that the cache doesn't mess with correctness. |
| 906 | self.assertEqual(shape.serialization['name'], 'other') |
| 907 | |
| 908 | def test_shape_overrides(self): |
| 909 | shape_map = { |
nothing calls this directly
no test coverage detected