def METHOD_NAME(db, search, params):
    search_run = SearchRun(search)
    espt_search = EsptSearch(search_run)
    espt_search.analyze_query()
    assert search_run.query.query_terms == params["expected_query_terms"]
    assert search_run.query.query_string == " ".join(params["expected_query_terms"])
    assert espt_search.new_tags == params["expected_new_tags"]
    lemma1 = Wordform.objects.get(slug=params["slug"], is_lemma=True)
    search_run.add_result(
        Result(
            wordform=lemma1,
            target_language_keyword_match=params["expected_query_terms"],
        )
    )
    espt_search.inflect_search_results()
    assert params["expected_inflection"] in [
        entry.wordform.text for entry in list(search_run.unsorted_results())
    ]