refactor: restructure test suite

- Remove tests/production/ directory (JWT auth, production monitoring, etc.)
- Remove tests/staking/ directory
- Remove tests/services/test_staking_service.py
- Remove tests/phase1/ directory
- Remove tests/load_test.py
- Add tests/verification/ directory with 20+ new test files
- Add tests/load/locustfile.py for load testing
- Add tests/security/test_confidential_transactions.py
- Add tests/integration/test_working_integration.py
- Update docs/ for minimum Python version and paths
This commit is contained in:
aitbc
2026-04-21 21:15:27 +02:00
parent cdba253fb2
commit 14e2d96870
45 changed files with 10425 additions and 693 deletions

View File

@@ -0,0 +1,91 @@
#!/usr/bin/env python3
"""
Verify that the explorer is using live data instead of mock
"""
import requests
import json
def main():
print("🔍 Verifying AITBC Explorer is using Live Data")
print("=" * 60)
# Check API endpoint
print("\n1. Testing API endpoint...")
try:
response = requests.get("https://aitbc.bubuit.net/api/explorer/blocks")
if response.status_code == 200:
data = response.json()
print(f"✅ API is working - Found {len(data['items'])} blocks")
# Show latest block
if data['items']:
latest = data['items'][0]
print(f"\n Latest Block:")
print(f" Height: {latest['height']}")
print(f" Hash: {latest['hash']}")
print(f" Proposer: {latest['proposer']}")
print(f" Time: {latest['timestamp']}")
else:
print(f"❌ API failed: {response.status_code}")
return
except Exception as e:
print(f"❌ API error: {e}")
return
# Check explorer page
print("\n2. Checking explorer configuration...")
# Get the JS file
try:
js_response = requests.get("https://aitbc.bubuit.net/explorer/assets/index-IsD_hiHT.js")
if js_response.status_code == 200:
js_content = js_response.text
# Check for live data mode
if 'dataMode:"live"' in js_content:
print("✅ Explorer is configured for LIVE data")
elif 'dataMode:"mock"' in js_content:
print("❌ Explorer is still using MOCK data")
return
else:
print("⚠️ Could not determine data mode")
except Exception as e:
print(f"❌ Error checking JS: {e}")
# Check other endpoints
print("\n3. Testing other endpoints...")
endpoints = [
("/api/explorer/transactions", "Transactions"),
("/api/explorer/addresses", "Addresses"),
("/api/explorer/receipts", "Receipts")
]
for endpoint, name in endpoints:
try:
response = requests.get(f"https://aitbc.bubuit.net{endpoint}")
if response.status_code == 200:
data = response.json()
print(f"{name}: {len(data['items'])} items")
else:
print(f"{name}: Failed ({response.status_code})")
except Exception as e:
print(f"{name}: Error - {e}")
print("\n" + "=" * 60)
print("✅ Explorer is successfully using LIVE data!")
print("\n📊 Live Data Sources:")
print(" • Blocks: https://aitbc.bubuit.net/api/explorer/blocks")
print(" • Transactions: https://aitbc.bubuit.net/api/explorer/transactions")
print(" • Addresses: https://aitbc.bubuit.net/api/explorer/addresses")
print(" • Receipts: https://aitbc.bubuit.net/api/explorer/receipts")
print("\n💡 Visitors to https://aitbc.bubuit.net/explorer/ will now see:")
print(" • Real blockchain data")
print(" • Actual transactions")
print(" • Live network activity")
print(" • No mock/sample data")
if __name__ == "__main__":
main()