Esempio n. 1
0
def test_get_ts_queries_from_keywords_string_parses_keywords_string_into_list_of_ts_strings(
):
    # given
    keywords_string = 'PNL sings Marx'

    # when
    keywords_result = get_ts_queries_from_keywords_string(keywords_string)

    # then
    assert keywords_result == ['PNL:*', 'sings:*', 'Marx:*']
Esempio n. 2
0
def test_get_ts_queries_from_keywords_string_with_double_space_parses_keywords_string_ignoring_stop_words(
):
    # given
    keywords_string = 'PNL sings with Marx'

    # when
    keywords_result = get_ts_queries_from_keywords_string(keywords_string)

    # then
    assert keywords_result == ['PNL:*', 'sings:*', 'Marx:*']
Esempio n. 3
0
def test_get_ts_queries_from_keywords_string_with_double_space_parses_keywords_string_ignoring_stop_words_with_capital_letter(
):
    # given
    keywords_string = 'One bed under a river'

    # when
    keywords_result = get_ts_queries_from_keywords_string(keywords_string)

    # then
    assert keywords_result == ['One:*', 'bed:*', 'river:*']
Esempio n. 4
0
def test_get_ts_queries_from_keywords_string_with_coma_parses_keywords_string_ignoring_words_with_less_than_one_char(
):
    # given
    keywords_string = "Læetitia a mangé's'"

    # when
    keywords_result = get_ts_queries_from_keywords_string(keywords_string)

    # then
    assert keywords_result == ['læetitia:*', 'mangé:*']
Esempio n. 5
0
def test_get_ts_queries_from_keywords_url_parses_keywords_string_ignoring_special_chars(
):
    # given
    keywords_string = "http://www.test.com"

    # when
    keywords_result = get_ts_queries_from_keywords_string(keywords_string)

    # then
    assert keywords_result == ['http:*', 'www:*', 'test:*', 'com:*']
Esempio n. 6
0
def test_get_ts_queries_from_keywords_string_with_double_space_parses_keywords_string_ignoring_stop_words_with_capital_letter(
):
    # given
    keywords_string = 'Un lit sous une rivière'

    # when
    keywords_result = get_ts_queries_from_keywords_string(keywords_string)

    # then
    assert keywords_result == ['lit:*', 'sous:*', 'rivière:*']
Esempio n. 7
0
def test_get_ts_queries_from_keywords_string_parses_keywords_string_into_list_of_ts_strings(
):
    # given
    keywords_string = 'PNL chante Marx'

    # when
    keywords_result = get_ts_queries_from_keywords_string(keywords_string)

    # then
    assert keywords_result == ['pnl:*', 'chante:*', 'marx:*']
Esempio n. 8
0
def test_get_ts_queries_from_keywords_string_with_double_space_parses_keywords_string_ignoring_stop_words(
):
    # given
    keywords_string = 'PNL  chante avec Marx'

    # when
    keywords_result = get_ts_queries_from_keywords_string(keywords_string)

    # then
    assert keywords_result == ['pnl:*', 'chante:*', 'marx:*']