def METHOD_NAME(manager, mocker):
    mock = mocker.patch.object(
        manager,
        'get_all_available_instances_names',
        return_value=['paris', 'pdl'],
    )
    with app.test_request_context('/'):
        instances = manager.get_instances()
        assert len(instances) == 2
        assert {'paris', 'pdl'} == {i.name for i in instances}
        instances = manager.get_instances('paris')
        assert len(instances) == 1
        assert 'paris' == instances[0].name