Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
 
Answered
Writing tests that use session cache

We have some code in our extension that uses the session cache to store and retrieve some data. I am now trying to write some pytest to assert that the values we retrieve from the session cache are the expected, but I am not sure how to set up a mocked session cache properly to do this. Is there a way to create a mocked cache and set some default key/value pairs in setup of the test? Any resources/examples/help would be greatly appreciated!

Votes Newest

Answers

104 Views
1 Answer
3 years ago
3 years ago
Tags