Skip to content

Commit

Permalink
tmp: fix test cmds
Browse files Browse the repository at this point in the history
  • Loading branch information
philogicae committed Dec 19, 2024
1 parent 42a7a69 commit f0e145c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/unit/test_commands.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import contextlib
import json
import os
from pathlib import Path
from tempfile import NamedTemporaryFile
from unittest.mock import AsyncMock, patch

from aleph.sdk.chains.ethereum import ETHAccount
from aleph.sdk.conf import settings
from typer.testing import CliRunner

from aleph_client.__main__ import app
from typer.testing import CliRunner

runner = CliRunner()
settings.API_HOST = "https://api.twentysix.testnet.network"
Expand Down Expand Up @@ -286,16 +286,18 @@ def test_file_upload():

def test_file_download():
# Test download a file to aleph network
ipfs_cid = "QmeomffUNfmQy76CQGy9NdmqEnnHU9soCexBnGU3ezPHVH"
result = runner.invoke(
app,
[
"file",
"download",
"QmeomffUNfmQy76CQGy9NdmqEnnHU9soCexBnGU3ezPHVH",
ipfs_cid,
], # 5 bytes file
)
assert result.exit_code == 0
assert result.stdout is not None
os.remove(ipfs_cid)


def test_app():
Expand Down

0 comments on commit f0e145c

Please sign in to comment.