File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 11import hashlib
2- from unittest .mock import MagicMock , patch
2+ from unittest .mock import AsyncMock , patch
33
44import pytest
55from aleph_message .models import AlephMessage , StoreMessage
@@ -18,7 +18,7 @@ def mock_authenticated_aleph_http_client():
1818 pkey = get_fallback_private_key ()
1919 account = ETHAccount (private_key = pkey )
2020
21- http_session = MagicMock ()
21+ http_session = AsyncMock ()
2222 mock_client = MockHttpClient .return_value
2323 mock_client .http_session = http_session
2424 mock_client .account = account
@@ -30,7 +30,7 @@ async def test_upload_with_message(mock_authenticated_aleph_http_client):
3030 content = b"Test pyaleph upload\n "
3131 file_hash = hashlib .sha256 (content ).hexdigest ()
3232
33- message = MagicMock ()
33+ message = AsyncMock ()
3434 message .content .item_hash = file_hash
3535 status = MessageStatus .PROCESSED
3636 mock_authenticated_aleph_http_client .create_store .return_value = (message , status )
You can’t perform that action at this time.
0 commit comments