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

@@ -6,8 +6,8 @@ Tests all functionality including validation, conflicts, and transaction import
import json
import hashlib
import requests
from datetime import datetime
from aitbc import AITBCHTTPClient
BASE_URL = "https://aitbc.bubuit.net/rpc"
CHAIN_ID = "ait-mainnet"
@@ -25,10 +25,11 @@ def test_block_import_complete():
print("=" * 60)
results = []
client = AITBCHTTPClient()
# Test 1: Invalid height (0)
print("\n[TEST 1] Invalid height (0)...")
response = requests.post(
response = client.post(
f"{BASE_URL}/importBlock",
json={
"height": 0,