Skip to content

Commit

Permalink
test: invite creator config
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
  • Loading branch information
dbluhm committed Apr 4, 2024
1 parent 58a5f62 commit ff8a613
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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
)

0 comments on commit ff8a613

Please sign in to comment.