From 0b09021d5cc72e5ac5a7675b0966c5d629ae8da8 Mon Sep 17 00:00:00 2001 From: Colin Goutte Date: Sun, 27 Aug 2023 21:42:54 +0200 Subject: [PATCH] test word separators --- utests/test_sql_database.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/utests/test_sql_database.py b/utests/test_sql_database.py index 6be3903..d3f5932 100644 --- a/utests/test_sql_database.py +++ b/utests/test_sql_database.py @@ -186,6 +186,25 @@ def test_search_movies_token(): assert found[0] == movie_desc +def test_search_movies_token_period(): + clear_db() + response = client.get("/movies/") + # assert response.json() == [] + + radix = rand_name() + + title = radix + "test_search_title titletokenperiod." + + with db_context() as db: + movie_title = crud.create_movie( + db, title=title, genres=["Animated", "Paropaganda"] + ) + + found = crud.search_movie(db, "title3tokenpreriod").all() + assert len(found) == 1 + assert found[0] == movie_title + + def test_sample_import_toy_story(): clear_db()