diff --git a/aries_cloudagent/vc/ld_proofs/document_loader.py b/aries_cloudagent/vc/ld_proofs/document_loader.py index 68c4e8586a..a315842a32 100644 --- a/aries_cloudagent/vc/ld_proofs/document_loader.py +++ b/aries_cloudagent/vc/ld_proofs/document_loader.py @@ -1,6 +1,5 @@ """JSON-LD document loader methods.""" -import concurrent.futures from typing import Callable from pydid.did_url import DIDUrl @@ -29,7 +28,6 @@ def __init__(self, profile: Profile, cache_ttl: int = 300) -> None: self.cache = profile.inject_or(BaseCache) self.online_request_loader = requests.requests_document_loader() self.requests_loader = StaticCacheJsonLdDownloader().load - self.executor = concurrent.futures.ThreadPoolExecutor(max_workers=1) self.cache_ttl = cache_ttl async def _load_did_document(self, did: str, options: dict): diff --git a/aries_cloudagent/vc/ld_proofs/tests/test_document_downloader.py b/aries_cloudagent/vc/ld_proofs/tests/test_document_downloader.py index 103f06ec7c..1998b7d6d2 100644 --- a/aries_cloudagent/vc/ld_proofs/tests/test_document_downloader.py +++ b/aries_cloudagent/vc/ld_proofs/tests/test_document_downloader.py @@ -1,4 +1,4 @@ -from unittest.mock import Mock +from unittest.mock import Mock, AsyncMock from aries_cloudagent.vc.ld_proofs.document_downloader import ( StaticCacheJsonLdDownloader, @@ -15,7 +15,7 @@ async def test_load_cache_hit(): async def test_load_cache_miss_triggers_download(): downloader = Mock() - downloader.download = Mock(return_value=(None, None)) + downloader.download = AsyncMock(return_value=(None, None)) context_loader = StaticCacheJsonLdDownloader(document_downloader=downloader) await context_loader.load("https://www.w3.org/2018/very_unlikely_name/v1")