feat: migrate tests to use centralized aitbc package utilities
Some checks failed
Python Tests / test-python (push) Failing after 43s

- Migrate HTTP client usage from requests to aitbc.AITBCHTTPClient in test files
- Update conftest.py to use aitbc path utilities (get_data_path, get_log_path)
- Update test_model_validation.py to use aitbc validators (validate_address, validate_hash)
- Skip HTML scraping files that require raw requests (verify_toggle_removed.py)
- Migrated files: test_payment_integration.py, test_cross_node_blockchain.py, verify_transactions_fixed.py, test_tx_import.py, test_simple_import.py, test_minimal.py, test_block_import_complete.py
This commit is contained in:
aitbc
2026-04-24 21:45:18 +02:00
parent 35196e4d43
commit 9b274d4386
12 changed files with 78 additions and 68 deletions

View File

@@ -19,14 +19,13 @@ def compute_block_hash(height, parent_hash, timestamp):
def test_block_import():
"""Test the block import endpoint with various scenarios"""
import requests
print("Testing Block Import Endpoint")
print("=" * 50)
# Get current head to work with existing blockchain
response = requests.get(f"{BASE_URL}/head")
head = response.json()
client = AITBCHTTPClient()
head = client.get(f"{BASE_URL}/head")
print(f"Current head: height={head['height']}, hash={head['hash']}")
# Use very high heights to avoid conflicts with existing chain