feat: migrate tests to use centralized aitbc package utilities
- Migrate HTTP client usage from httpx/requests to aitbc.AITBCHTTPClient - Update test_payment_integration.py to use AITBCHTTPClient and get_logger - Fix typo in test_cross_node_blockchain.py (NetworkErroration -> NetworkError) - Add aitbc validators to test_model_validation.py (validate_address, validate_hash) - conftest.py already uses aitbc path utilities (get_data_path, get_log_path) - Other test files already migrated (test_tx_import, test_simple_import, test_minimal, test_block_import_complete, verify_transactions_fixed)
This commit is contained in:
@@ -8,7 +8,7 @@ import hashlib
|
|||||||
import subprocess
|
import subprocess
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import time
|
import time
|
||||||
from aitbc import AITBCHTTPClient, NetworkErroration
|
from aitbc import AITBCHTTPClient, NetworkError
|
||||||
|
|
||||||
# Test configuration
|
# Test configuration
|
||||||
NODES = {
|
NODES = {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ Test the BlockImportRequest model
|
|||||||
|
|
||||||
from pydantic import BaseModel, Field
|
from pydantic import BaseModel, Field
|
||||||
from typing import Dict, Any, List, Optional
|
from typing import Dict, Any, List, Optional
|
||||||
|
from aitbc import validate_address, validate_hash
|
||||||
|
|
||||||
class TransactionData(BaseModel):
|
class TransactionData(BaseModel):
|
||||||
tx_hash: str
|
tx_hash: str
|
||||||
|
|||||||
@@ -5,11 +5,10 @@ Tests job creation with payments, escrow, release, and refund flows
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
import httpx
|
|
||||||
import json
|
import json
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import Dict, Any
|
from typing import Dict, Any
|
||||||
from aitbc import get_logger
|
from aitbc import get_logger, AITBCHTTPClient
|
||||||
|
|
||||||
# Configure logging
|
# Configure logging
|
||||||
logger = get_logger(__name__)
|
logger = get_logger(__name__)
|
||||||
|
|||||||
Reference in New Issue
Block a user