Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
justin-cechmanek committed Aug 23, 2024
1 parent 3e73b74 commit 1c019cf
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/integration/test_llmcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,16 +522,16 @@ def test_index_updating(redis_url):
)

cache_no_tags.store(
prompt="this prompt has no tags",
response="this response has no tags",
prompt="this prompt has tags",
response="this response has tags",
filters={"some_tag": "abc"},
)

# filterable_fields not defined in schema, so no tags will match
tag_filter = Tag("some_tag") == "abc"

response = cache_no_tags.check(
prompt="this prompt has no tag",
prompt="this prompt has a tag",
filter_expression=tag_filter,
)
assert response == []
Expand All @@ -551,8 +551,7 @@ def test_index_updating(redis_url):
)

response = cache_overwrite.check(
prompt="this prompt has no tag",
prompt="this prompt has a tag",
filter_expression=tag_filter,
)

assert len(response) == 1

0 comments on commit 1c019cf

Please sign in to comment.