feat: migrate tests to use centralized aitbc package utilities
Some checks failed
Python Tests / test-python (push) Failing after 43s
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:
@@ -3,7 +3,7 @@
|
||||
Verify that transactions are now showing properly on the explorer
|
||||
"""
|
||||
|
||||
import requests
|
||||
from aitbc import AITBCHTTPClient, NetworkError
|
||||
|
||||
def main():
|
||||
print("🔍 Verifying Transactions Display on AITBC Explorer")
|
||||
@@ -12,9 +12,9 @@ def main():
|
||||
# Check API
|
||||
print("\n1. API Check:")
|
||||
try:
|
||||
response = requests.get("https://aitbc.bubuit.net/api/explorer/transactions")
|
||||
if response.status_code == 200:
|
||||
data = response.json()
|
||||
client = AITBCHTTPClient()
|
||||
data = client.get("https://aitbc.bubuit.net/api/explorer/transactions")
|
||||
if data:
|
||||
print(f" ✅ API returns {len(data['items'])} transactions")
|
||||
|
||||
# Count by status
|
||||
@@ -27,8 +27,8 @@ def main():
|
||||
for status, count in status_counts.items():
|
||||
print(f" • {status}: {count}")
|
||||
else:
|
||||
print(f" ❌ API failed: {response.status_code}")
|
||||
except Exception as e:
|
||||
print(f" ❌ API failed")
|
||||
except NetworkError as e:
|
||||
print(f" ❌ Error: {e}")
|
||||
|
||||
# Check main explorer page
|
||||
|
||||
Reference in New Issue
Block a user