Skip to content

Commit

Permalink
copy() -> model_copy()
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamalama committed Jul 23, 2024
1 parent 1b42788 commit 5c06f2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/unit/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ def _add(
):
if query_fields is None:
query_fields = {"primary_email": contact_fixture.email.primary_email}
sample = contact_fixture.copy(deep=True)
sample = contact_fixture.model_copy(deep=True)
sample = modifier(sample)
resp = client.post("/ctms", content=sample.model_dump_json())
assert resp.status_code == code, resp.text
Expand Down Expand Up @@ -708,7 +708,7 @@ def _add(
if query_fields is None:
query_fields = {"primary_email": contact.email.primary_email}
new_default_fields = new_default_fields or set()
sample = contact.copy(deep=True)
sample = contact.model_copy(deep=True)
sample = modifier(sample)
resp = client.put(
f"/ctms/{sample.email.email_id}", content=sample.model_dump_json()
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/schemas/test_contact.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def example_contact_in(dbsession, email_factory):


def test_idempotent_equal(example_contact_in):
contact_copy = example_contact_in.copy(deep=True)
contact_copy = example_contact_in.model_copy(deep=True)
assert example_contact_in.idempotent_equal(contact_copy)
assert contact_copy.idempotent_equal(example_contact_in)

Expand Down

0 comments on commit 5c06f2f

Please sign in to comment.