def test_type_info_wraps_in_array_if_array(self): prop = Property("foo", "desc", min_cardinality=0) prop.add_type(RefType("reef")) self.assertEqual(prop.type_info(), { 'type': 'array', 'items': {'$ref': 'reef'}, })
def test_type_info_generates_flat_type_info_if_not_array(self): prop = Property("foo", "desc") prop.add_type(RefType("reef")) self.assertEqual(prop.type_info(), {'$ref': 'reef'})