Skip to content

Commit 6498e40

Browse files
cmgroteclaude
andcommitted
fix: address Copilot review comments on serde contract tests
- Rename test_string_boolean_is_locked_accepted → test_string_boolean_is_optional_accepted and update docstring to match the isOptional field actually being tested - Rename test_string_encoded_integer_cardinality_accepted → test_string_boolean_is_indexable_accepted and update docstring to reflect isIndexable: 'false' string coercion - Fix propagateTagPropagation key assertion to use correct camelCase propagateTags Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 1a823fa commit 6498e40

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

tests_v9/unit/test_v9_typedef_serde_contract.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,8 @@ def test_propagate_tags_absent_from_re_encoded_output(self) -> None:
340340
decoded = _decode(raw)
341341
re_encoded = _encode(decoded)
342342
rel_out = re_encoded["relationshipDefs"][0]
343-
assert "propagateTagPropagation" not in rel_out, (
344-
"propagateTagPropagation injected with stale default — would corrupt Atlas writes."
343+
assert "propagateTags" not in rel_out, (
344+
"propagateTags injected with stale default — would corrupt Atlas writes."
345345
)
346346

347347
def test_relationship_category_absent_from_output_when_not_in_source(self) -> None:
@@ -494,8 +494,8 @@ class TestStrictFalseDecoding:
494494
numbers as strings. The decoder must accept these without raising.
495495
"""
496496

497-
def test_string_boolean_is_locked_accepted(self) -> None:
498-
"""isLocked: 'true' (string) must decode without error."""
497+
def test_string_boolean_is_optional_accepted(self) -> None:
498+
"""isOptional: 'true' (string) must decode without error."""
499499
raw = _payload(
500500
entityDefs=[
501501
{
@@ -529,9 +529,9 @@ def test_strict_true_rejects_string_boolean(self) -> None:
529529
with pytest.raises(msgspec.ValidationError):
530530
strict_decoder.decode(raw)
531531

532-
def test_string_encoded_integer_cardinality_accepted(self) -> None:
533-
"""isIndexable: '1' (string-encoded int treated as truthy) — strict=False coerces str→bool."""
534-
# strict=False coerces str → bool/int, not int → str.
532+
def test_string_boolean_is_indexable_accepted(self) -> None:
533+
"""isIndexable: 'false' (string) must decode without error — strict=False coerces str→bool."""
534+
# strict=False coerces str → bool, not int → str.
535535
# The common Atlas pattern is string-encoded booleans ("true"/"false").
536536
raw = _payload(
537537
entityDefs=[

0 commit comments

Comments
 (0)