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
 
Unanswered
← How to mock Q2 database

Hello Dario,

I am going to include general information for those that may see this and want more information about how unit testing works. For those that apply to that see our documentation on Unit testing here:
https://docs.q2developer.com/guides/code_quality/unit_testing.html

For your specific application and a lot of other applications where mocking functions, objects, modules, attributes, and many other things see the pytest documentation here:
https://docs.pytest.org/en/latest/how-to/monkeypatch.html

The Caliper SDK has excellent unit test coverage, so if you are looking for examples for other pieces of code I recommend looking here:
https://gitlab.com/Q2Antilles/q2-sdk

-Trey

Posted 4 years ago
Trey Teter
124 × 2 Administrator
0

I get a 404 on https://gitlab.com/Q2Antilles/q2-sdk. Do I need additional permissions?

— Dario Bahena   4 years ago
0

Your company was missing permissions. Everyone should have them, they just need to be set on creation, and they weren't set. You should be good now. Anyone reading this later missing permissions can request permissions with a ticket here: https://q2developer.com/support/create?ticketType=General

— Trey Teter   4 years ago
26 Views
0 Answers
4 years ago
4 years ago