def METHOD_NAME(manager, mocker):
    mock = mocker.patch.object(
        manager, '_all_keys_of_coord_in_instances', return_value=[manager.instances['paris']]
    )
    mock = mocker.patch.object(
        manager,
        'get_all_available_instances_names',
        return_value=['paris', 'pdl'],
    )
    with app.test_request_context('/'):
        instances = manager.get_instances(lon=4, lat=3)
        assert len(instances) == 1
        assert 'paris' == instances[0].name
        assert mock.called