Skip to content

Commit

Permalink
add init value passing test
Browse files Browse the repository at this point in the history
  • Loading branch information
briantist committed Sep 17, 2023
1 parent a59fb22 commit 6ad5f9f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/unit_tests/api/system_backend/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,25 @@ def test_initialize_errors(
)

mock_adapter.request.assert_not_called()

def test_initialize_value_pass(self, sys_init):
(r_args, r_kwargs) = sys_init.initialize(
secret_threshold=0,
secret_shares=2,
root_token_pgp_key="abc",
pgp_keys=[1, 2],
stored_shares=2,
recovery_shares=3,
recovery_pgp_keys=[1, 2, 3],
recovery_threshold=3,
)
params = r_kwargs["json"]

assert params["secret_threshold"] == 0
assert params["secret_shares"] == 2
assert params["root_token_pgp_key"] == "abc"
assert params["pgp_keys"] == [1, 2]
assert params["stored_shares"] == 2
assert params["recovery_shares"] == 3
assert params["recovery_pgp_keys"] == [1, 2, 3]
assert params["recovery_threshold"] == 3

0 comments on commit 6ad5f9f

Please sign in to comment.