fix: remove /v1 prefix from agent API endpoints and resolve variable naming conflicts
- Update all agent command endpoints to remove /v1 prefix for API consistency - Rename `success` variable to `is_success` in chain.py to avoid conflict with success() function - Rename `output` parameter to `output_file` in genesis.py for clarity - Add admin command help tests to verify command structure - Update blockchain status endpoint from /status to /v1/health in tests - Mark admin help command as working
This commit is contained in:
15
run_test.py
Normal file
15
run_test.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from click.testing import CliRunner
|
||||
from aitbc_cli.commands.wallet import wallet
|
||||
import pathlib
|
||||
import json
|
||||
|
||||
runner = CliRunner()
|
||||
mock_wallet_dir = pathlib.Path("/tmp/test_wallet_dir_qwe")
|
||||
mock_wallet_dir.mkdir(parents=True, exist_ok=True)
|
||||
wallet_file = mock_wallet_dir / "test_wallet.json"
|
||||
with open(wallet_file, "w") as f:
|
||||
json.dump({"test": "data"}, f)
|
||||
|
||||
result = runner.invoke(wallet, ['delete', 'test_wallet', '--confirm'], obj={"wallet_dir": mock_wallet_dir, "output_format": "json"})
|
||||
print(f"Exit code: {result.exit_code}")
|
||||
print(f"Output: {result.output}")
|
||||
Reference in New Issue
Block a user