Skip to content

Commit

Permalink
chore: Fix broken tests from Cherry-Pick
Browse files Browse the repository at this point in the history
After Cherrypicking hyperledger#1962, the unit tests began to fail due to
changes elsewhere in the codebase. This commit intends to fix those
failures.

Signed-off-by: Colton Wolkins (Indicio work address) <colton@indicio.tech>
  • Loading branch information
frostyfrog committed Oct 10, 2022
1 parent 0a16226 commit c17f965
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions aries_cloudagent/resolver/default/indy.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Resolution is performed using the IndyLedger class.
"""

import logging
from typing import Optional, Pattern, Sequence, Text

from pydid import DID, DIDDocumentBuilder
Expand All @@ -21,6 +22,8 @@

from ..base import BaseDIDResolver, DIDNotFound, ResolverError, ResolverType

LOGGER = logging.getLogger(__name__)


class NoIndyLedger(ResolverError):
"""Raised when there is no Indy ledger instance configured."""
Expand Down
7 changes: 5 additions & 2 deletions aries_cloudagent/resolver/default/tests/test_indy.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ def resolver():
def ledger():
"""Ledger fixture."""
ledger = async_mock.MagicMock(spec=BaseLedger)
ledger.get_endpoint_for_did = async_mock.CoroutineMock(
return_value="https://github.com/"
ledger.get_all_endpoints_for_did = async_mock.CoroutineMock(
return_value={
"endpoint": "https://github.com/",
"profile": "https://example.com/profile",
}
)
ledger.get_key_for_did = async_mock.CoroutineMock(return_value="key")
yield ledger
Expand Down
2 changes: 1 addition & 1 deletion aries_cloudagent/resolver/did_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from datetime import datetime
from itertools import chain
import logging
from typing import Optional, List, Sequence, Tuple, Text, Type, TypeVar, Union
from typing import Optional, Sequence, Tuple, Text, Type, TypeVar, Union

from pydid import DID, DIDError, DIDUrl, Resource, NonconformantDocument
from pydid.doc.doc import IDNotFoundError
Expand Down

0 comments on commit c17f965

Please sign in to comment.