Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
fix: reference updater test
Browse files Browse the repository at this point in the history
  • Loading branch information
sbasan committed Jul 3, 2024
1 parent e57fef6 commit 27a8d9d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ def test_not_update_parcel_references(self):

updated_parcel = update_parcel_references(aip_parcel, pushed_objects)

assert updated_parcel is aip_parcel
assert updated_parcel.model_dump_json() == aip_parcel.model_dump_json()
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@


def update_parcel_references(parcel: T, uuid_map: Dict[UUID, UUID]) -> T:
"""
Replaces UUID strings found in json dump based on provided map
always returns a copy of original even when there was no substitution
always perform output validation
"""
target_dump = parcel.model_dump_json(by_alias=True)
pattern = '"{}"'

Expand Down

0 comments on commit 27a8d9d

Please sign in to comment.