Skip to content

Commit 996b20a

Browse files
author
Johannes Lichtenberger
committed
Fix test_read_metadata: descendantCount is only present when hash is enabled
The SirixDB serializer only emits descendantCount when hash is present (rtx.getHash() != 0L). Updated test to only check for descendantCount inside the hash-present conditional block.
1 parent 8b03e22 commit 996b20a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_resource_sync.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,11 @@ def test_read_metadata():
9898
assert isinstance(metadata["hash"], str)
9999
assert len(metadata["hash"]) == 16
100100
assert all(c in "0123456789abcdef" for c in metadata["hash"])
101+
# descendantCount is only present when hash is enabled
102+
assert metadata["descendantCount"] == 0
101103
# Verify other metadata fields
102104
assert metadata["nodeKey"] == 1
103105
assert metadata["type"] == "ARRAY"
104-
assert metadata["descendantCount"] == 0
105106
assert metadata["childCount"] == 0
106107
assert resp["value"] == []
107108

0 commit comments

Comments
 (0)