This commit is contained in:
2025-07-09 13:44:39 -03:00
parent 690be35634
commit 72b1338135
7 changed files with 66 additions and 27 deletions

View File

@@ -9,3 +9,17 @@ def test_parse():
{'attr': 'payment_date', 'op': '>=', 'value': '2025-07-01'},
{'attr': 'status', 'op': '=', 'value': 'PAID'},
]
assert meili.parse('cnpj%20EXISTS') == [
{'attr': 'cnpj', 'op': 'EXISTS', 'value': ''}
]
def test_encode():
r = meili.encode(
[
{'attr': 'tenant', 'op': '=', 'value': '*'},
{'attr': 'cnpj', 'op': 'EXISTS', 'value': ''},
]
)
assert r == 'tenant = * AND cnpj EXISTS'