aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_utils.py
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-04-14 23:00:33 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-04-14 23:00:33 +0200
commit1ffae095fdcbe78cf0c3eae21c9725ef9b1aacc1 (patch)
tree2fe6ca9da3c9c66242930cb1cb40371259a52528 /tests/test_utils.py
parent1a096a775e13b8b2c6f90d706a5805cb047a6372 (diff)
downloadfuzzycat-1ffae095fdcbe78cf0c3eae21c9725ef9b1aacc1.tar.gz
fuzzycat-1ffae095fdcbe78cf0c3eae21c9725ef9b1aacc1.zip
fix imports and formatting
Diffstat (limited to 'tests/test_utils.py')
-rw-r--r--tests/test_utils.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/test_utils.py b/tests/test_utils.py
index 24be9d1..381c44e 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -99,11 +99,22 @@ def test_zstdlines():
with open(fn) as f:
assert [s.strip() for s in f.readlines()] == list(zstdlines(zfn))
+
def test_es_compat_hits_total():
cases = (
- ({"hits": {"total": 6}}, 6),
- ({"hits": {"total": {"value": 7, "relation": "eq"}}}, 7),
+ ({
+ "hits": {
+ "total": 6
+ }
+ }, 6),
+ ({
+ "hits": {
+ "total": {
+ "value": 7,
+ "relation": "eq"
+ }
+ }
+ }, 7),
)
for r, expected in cases:
assert es_compat_hits_total(r) == expected
-