Skip to content

Commit 440c96a

Browse files
Migrate Pydantic to new interface (#807)
Signed-off-by: Emmanuel Ferdman <[email protected]>
1 parent 23a11cd commit 440c96a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

tests/message_processing/test_process_instances.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ def fixture_forget_instance_message(
294294
sender=fixture_instance_message.sender,
295295
signature=None,
296296
item_type=ItemType.inline,
297-
item_content=content.json(),
297+
item_content=content.model_dump_json(),
298298
time=fixture_instance_message.time + dt.timedelta(seconds=1),
299299
channel=None,
300300
reception_time=fixture_instance_message.reception_time

tests/message_processing/test_process_pending_txs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ async def test_process_pending_smart_contract_tx_post(
214214
type="my-type",
215215
address="KT1VBeLD7hzKpj17aRJ3Kc6QQFeikCEXi7W6",
216216
time=1000,
217-
).json(),
217+
).model_dump_json(),
218218
)
219219

220220
await _process_smart_contract_tx(

tests/schemas/test_pending_messages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def test_parse_program_message():
170170
content = json.loads(message_dict["item_content"])
171171
assert message.content.address == content["address"]
172172
assert message.content.time == content["time"]
173-
assert message.content.code.dict(exclude_none=True) == content["code"]
173+
assert message.content.code.model_dump(exclude_none=True) == content["code"]
174174
assert message.content.type == content["type"]
175175

176176

0 commit comments

Comments
 (0)