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()