Skip to content

Commit f82317f

Browse files
author
Roman
committed
improve unit test
1 parent 5a799c1 commit f82317f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/unit_tests/extrinsics/test_serving.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def test_publish_metadata(
355355
patch.object(mock_subtensor.substrate, "compose_call"),
356356
patch.object(
357357
mock_subtensor, "sign_and_send_extrinsic", return_value=response_success
358-
),
358+
) as mocked_sign_and_send_extrinsic,
359359
):
360360
# Act
361361
result = serving.publish_metadata(
@@ -369,3 +369,11 @@ def test_publish_metadata(
369369
)
370370
# Assert
371371
assert result == expected_result, f"Test ID: {test_id}"
372+
mocked_sign_and_send_extrinsic.assert_called_once_with(
373+
call=mock_subtensor.substrate.compose_call.return_value,
374+
wallet=mock_wallet,
375+
sign_with="hotkey",
376+
wait_for_inclusion=wait_for_inclusion,
377+
wait_for_finalization=wait_for_finalization,
378+
period=None,
379+
)

0 commit comments

Comments
 (0)