From ff8a613e1e8c667b348c3a8a85a8d2494400a2c5 Mon Sep 17 00:00:00 2001 From: Daniel Bluhm Date: Thu, 4 Apr 2024 15:51:53 -0400 Subject: [PATCH] test: invite creator config Signed-off-by: Daniel Bluhm --- .../v1_0/tests/test_invite_creator.py | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 aries_cloudagent/protocols/out_of_band/v1_0/tests/test_invite_creator.py diff --git a/aries_cloudagent/protocols/out_of_band/v1_0/tests/test_invite_creator.py b/aries_cloudagent/protocols/out_of_band/v1_0/tests/test_invite_creator.py new file mode 100644 index 0000000000..107357dd15 --- /dev/null +++ b/aries_cloudagent/protocols/out_of_band/v1_0/tests/test_invite_creator.py @@ -0,0 +1,26 @@ +"""Test the InvitationCreator class.""" + +from unittest.mock import MagicMock +import pytest + +from ..manager import InvitationCreator, OutOfBandManagerError + + +@pytest.mark.parametrize( + "args", + [ + ({}), + ({"metadata": "test"}), + ({"attachments": "test", "multi_use": True}), + ({"hs_protos": "test", "public": True, "use_did": True}), + ({"hs_protos": "test", "public": True, "use_did_method": True}), + ({"hs_protos": "test", "use_did": True, "use_did_method": True}), + ({"hs_protos": "test", "create_unique_did": True}), + ({"hs_protos": "test", "use_did_method": "some_did_method"}), + ], +) +def test_init_param_checking_x(args): + with pytest.raises(OutOfBandManagerError): + InvitationCreator( + profile=MagicMock(), route_manager=MagicMock(), oob=MagicMock(), **args + )