-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bugs on aleph node cmds + sanitize_url + missing tests (#329)
* Fix bugs on aleph node commands + sanitize_url * Add tests for aleph node cmds
- Loading branch information
1 parent
cdf4aab
commit d3e710e
Showing
5 changed files
with
63 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from __future__ import annotations | ||
|
||
import pytest | ||
|
||
from aleph_client.commands.node import compute, core | ||
|
||
|
||
@pytest.mark.asyncio | ||
async def test_node_core(capsys): | ||
await core( | ||
json=False, | ||
active=True, | ||
address=None, | ||
ccn_hash=None, | ||
debug=False, | ||
) | ||
captured = capsys.readouterr() | ||
assert "Core Channel Node Information" in captured.out | ||
|
||
|
||
@pytest.mark.asyncio | ||
async def test_node_compute(capsys): | ||
await compute( | ||
json=False, | ||
active=True, | ||
address=None, | ||
payg_receiver=None, | ||
crn_url=None, | ||
crn_hash=None, | ||
ccn_hash=None, | ||
debug=False, | ||
) | ||
captured = capsys.readouterr() | ||
assert "Compute Node Information" in captured.out |