def test_get_mapper_from_registry_str_name(): class UserMapper(Mapper): __type__ = dict id = String(required=True, read_only=True) name = String() mapper = get_mapper_from_registry('UserMapper') assert mapper == UserMapper
def test_get_mapper_from_registry_mapper_does_not_exist(): with pytest.raises(MapperError): get_mapper_from_registry('OtherMapper')