Esempio n. 1
0
def test_mef_person_es_mapping(es_clear, db, mef_person_data_tmp):
    """."""
    search = MefPersonsSearch()
    mapping = get_mapping(search.Meta.index)
    assert mapping
    MefPerson.create(mef_person_data_tmp,
                     dbcommit=True,
                     reindex=True,
                     delete_pid=True)
    assert mapping == get_mapping(search.Meta.index)
Esempio n. 2
0
def mef_person(app, mef_person_data):
    """."""
    pers = MefPerson.create(data=mef_person_data,
                            delete_pid=False,
                            dbcommit=True,
                            reindex=True)
    flush_index(MefPersonsSearch.Meta.index)
    return pers