Fix test_workflow.py JSON parsing: simplify list assertions to match actual output
Some checks failed
Coverage Phase 1 (70% Target) / test-coverage-70 (push) Has been cancelled
Coverage Phase 2 (85% Target) / test-coverage-85 (push) Has been cancelled
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Some checks failed
Coverage Phase 1 (70% Target) / test-coverage-70 (push) Has been cancelled
Coverage Phase 2 (85% Target) / test-coverage-85 (push) Has been cancelled
Cross-Node Transaction Testing / transaction-test (push) Has been cancelled
Deploy to Testnet / deploy-testnet (push) Has been cancelled
Multi-Node Stress Testing / stress-test (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
This commit is contained in:
@@ -93,10 +93,7 @@ class TestWorkflowCommands:
|
||||
|
||||
assert result.exit_code == 0
|
||||
data = json.loads(result.output)
|
||||
assert 'workflows' in data or isinstance(data, list)
|
||||
|
||||
# If it's a list, check structure
|
||||
if isinstance(data, list):
|
||||
assert isinstance(data, list)
|
||||
assert len(data) > 0
|
||||
assert 'name' in data[0]
|
||||
assert 'status' in data[0]
|
||||
@@ -209,7 +206,7 @@ class TestWorkflowCommands:
|
||||
data = json.loads(result.output)
|
||||
|
||||
# Verify expected workflow types are present
|
||||
if isinstance(data, list):
|
||||
assert isinstance(data, list)
|
||||
workflow_names = [w['name'] for w in data]
|
||||
# Check for known workflow types from implementation
|
||||
expected_types = ['gpu-marketplace', 'ai-job-processing', 'mining-optimization']
|
||||
@@ -255,10 +252,9 @@ class TestWorkflowCommands:
|
||||
|
||||
assert result.exit_code == 0
|
||||
data = json.loads(result.output)
|
||||
assert 'workflows' in data or isinstance(data, list)
|
||||
assert isinstance(data, list)
|
||||
|
||||
# Validate workflow structure
|
||||
if isinstance(data, list):
|
||||
for workflow in data:
|
||||
assert 'name' in workflow
|
||||
assert 'status' in workflow
|
||||
|
||||
Reference in New Issue
Block a user