Skip to content

Commit

Permalink
updates test to catch the exception when query.timeout() is called
Browse files Browse the repository at this point in the history
  • Loading branch information
meiravgri authored Sep 12, 2023
1 parent 7a020bd commit 6590130
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -2266,6 +2266,5 @@ def test_query_timeout(r: redis.Redis):
assert q1.get_args() == ["foo", "TIMEOUT", 5000, "LIMIT", 0, 10]
q1 = Query("foo").timeout(0)
assert q1.get_args() == ["foo", "TIMEOUT", 0, "LIMIT", 0, 10]
q2 = Query("foo").timeout("not_a_number")
with pytest.raises(AttributeError):
r.ft().search(q2)
Query("foo").timeout("not_a_number")

0 comments on commit 6590130

Please sign in to comment.