Skip to content

Commit

Permalink
🚧
Browse files Browse the repository at this point in the history
Signed-off-by: ff137 <[email protected]>
  • Loading branch information
ff137 committed May 10, 2024
1 parent c7c2692 commit b09f81f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions aries_cloudagent/vc/ld_proofs/document_loader.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""JSON-LD document loader methods."""

import concurrent.futures
from typing import Callable

from pydid.did_url import DIDUrl
Expand Down Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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")
Expand Down

0 comments on commit b09f81f

Please sign in to comment.