Skip to content

Commit

Permalink
✅ Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ff137 committed Dec 5, 2024
1 parent d77b41b commit bea77bb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/tests/e2e/test_did_rotate.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from assertpy import assert_that
from fastapi import HTTPException

from app.models.wallet import DIDCreate
from app.routes.connections import router as connections_router
from app.services import acapy_wallet
from app.tests.util.webhooks import check_webhook_state
Expand All @@ -13,10 +14,12 @@


@pytest.mark.anyio
@pytest.mark.parametrize("did_method", ["did:peer:2", "did:peer:4"])
async def test_rotate_did(
alice_member_client: RichAsyncClient,
alice_acapy_client: AcaPyClient,
faber_acapy_client: AcaPyClient,
did_method: str,
):
# First, create did-exchange connections between Alice and Faber:
faber_public_did = await acapy_wallet.get_public_did(controller=faber_acapy_client)
Expand All @@ -36,8 +39,10 @@ async def test_rotate_did(
)

# Create a new did for Alice and rotate
new_did = await acapy_wallet.create_did(controller=alice_acapy_client)
alice_new_did = qualified_did_sov(new_did.did)
new_did = await acapy_wallet.create_did(
controller=alice_acapy_client, did_create=DIDCreate(method=did_method)
)
alice_new_did = new_did.did

rotate_response = await alice_member_client.post(
f"{CONNECTIONS_BASE_PATH}/did-rotate",
Expand Down

0 comments on commit bea77bb

Please sign in to comment.