Skip to content

Add round-trip and serialization tests#47

Merged
dannywillems merged 2 commits intomainfrom
add-round-trip-tests
Feb 8, 2026
Merged

Add round-trip and serialization tests#47
dannywillems merged 2 commits intomainfrom
add-round-trip-tests

Conversation

@dannywillems
Copy link
Contributor

Summary

  • Add 32 tests in test_serialization.py covering:
    • Decimal field serialize()/deserialize() paths (with and without
      resolution, round-trip, int/float input)
    • to_dict() for GeoPoint, Network, Certificate, L9HttpEvent, Software,
      SoftwareModule, DatasetSummary, GeoLocation, L9ServiceEvent
    • Round-trip (from_dict(x).to_dict() == x) for all base models
    • Full L9Event round-trip from reference JSON and ip4scout files
    • Serde behavior: None-valued optional fields omitted on serialization

Closes #24

@dannywillems dannywillems force-pushed the add-round-trip-tests branch 2 times, most recently from f726e41 to dd0f233 Compare February 8, 2026 02:16
Add 32 tests covering to_dict(), Decimal field serialize/deserialize,
and round-trip (from_dict -> to_dict) for all models. Documents serde
behavior where None-valued optional fields are omitted on serialization.

Closes #24
@dannywillems dannywillems merged commit 7b90670 into main Feb 8, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add round-trip and serialization tests

1 participant