fix: add missing imports and enable asyncio_mode for pytest
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Successful in 4s
Deploy to Testnet / deploy-testnet (push) Successful in 1m23s
Multi-Node Stress Testing / stress-test (push) Successful in 7s
Node Failover Simulation / failover-test (push) Successful in 13s
Python Tests / test-python (push) Has been cancelled
Some checks failed
Cross-Node Transaction Testing / transaction-test (push) Successful in 4s
Deploy to Testnet / deploy-testnet (push) Successful in 1m23s
Multi-Node Stress Testing / stress-test (push) Successful in 7s
Node Failover Simulation / failover-test (push) Successful in 13s
Python Tests / test-python (push) Has been cancelled
- Add import requests to test_block_import.py, test_minimal.py, test_simple_import.py, test_tx_import.py - Add -o asyncio_mode=auto to pytest command to enable pytest-asyncio - Fixes NameError and async function not supported errors in python-tests.yml
This commit is contained in:
@@ -81,6 +81,7 @@ jobs:
|
||||
tests/verification/ \
|
||||
-c /dev/null --rootdir "$PWD" --import-mode=importlib \
|
||||
--tb=short -q --timeout=30 \
|
||||
-o asyncio_mode=auto \
|
||||
--cov=apps --cov=packages --cov=cli --cov-append
|
||||
|
||||
- name: Run app and package tests with coverage
|
||||
|
||||
@@ -7,6 +7,7 @@ Tests the /rpc/blocks/import POST endpoint functionality
|
||||
import json
|
||||
import hashlib
|
||||
from datetime import datetime, UTC
|
||||
import requests
|
||||
|
||||
# Test configuration
|
||||
BASE_URL = "https://aitbc.bubuit.net/rpc"
|
||||
@@ -24,8 +25,8 @@ def test_block_import():
|
||||
print("=" * 50)
|
||||
|
||||
# Get current head to work with existing blockchain
|
||||
client = AITBCHTTPClient()
|
||||
head = client.get(f"{BASE_URL}/head")
|
||||
head_response = requests.get(f"{BASE_URL}/head")
|
||||
head = head_response.json()
|
||||
print(f"Current head: height={head['height']}, hash={head['hash']}")
|
||||
|
||||
# Use very high heights to avoid conflicts with existing chain
|
||||
|
||||
@@ -5,6 +5,7 @@ Minimal test to debug transaction import
|
||||
|
||||
import json
|
||||
import hashlib
|
||||
import requests
|
||||
from aitbc import AITBCHTTPClient, NetworkError
|
||||
|
||||
BASE_URL = "https://aitbc.bubuit.net/rpc"
|
||||
|
||||
@@ -5,6 +5,7 @@ Simple test for block import endpoint without transactions
|
||||
|
||||
import json
|
||||
import hashlib
|
||||
import requests
|
||||
from aitbc import AITBCHTTPClient, NetworkError
|
||||
|
||||
BASE_URL = "https://aitbc.bubuit.net/rpc"
|
||||
|
||||
@@ -5,6 +5,7 @@ Test transaction import specifically
|
||||
|
||||
import json
|
||||
import hashlib
|
||||
import requests
|
||||
from aitbc import AITBCHTTPClient, NetworkError
|
||||
|
||||
BASE_URL = "https://aitbc.bubuit.net/rpc"
|
||||
|
||||
Reference in New Issue
Block a user