fix emojies

This commit is contained in:
Dobromir Popov
2025-11-22 21:46:35 +02:00
parent e541e16e7e
commit 9a06288911
37 changed files with 528 additions and 181 deletions

View File

@@ -104,7 +104,7 @@ class TestAllConnectors:
await connector.unsubscribe_orderbook('BTCUSDT')
await connector.unsubscribe_trades('ETHUSDT')
print(f"{name} subscription interface works")
print(f"{name} subscription interface works")
except Exception as e:
print(f"{name} subscription interface failed: {e}")
@@ -140,7 +140,7 @@ class TestAllConnectors:
assert 'exchange' in stats
assert stats['exchange'] == name
assert 'connection_status' in stats
print(f"{name} statistics interface works")
print(f"{name} statistics interface works")
except Exception as e:
print(f"{name} statistics interface failed: {e}")
@@ -160,7 +160,7 @@ class TestAllConnectors:
connector.remove_data_callback(test_callback)
assert test_callback not in connector.data_callbacks
print(f"{name} callback system works")
print(f"{name} callback system works")
except Exception as e:
print(f"{name} callback system failed: {e}")
@@ -176,7 +176,7 @@ class TestAllConnectors:
is_connected = connector.is_connected
assert isinstance(is_connected, bool)
print(f"{name} connection status interface works")
print(f"{name} connection status interface works")
except Exception as e:
print(f"{name} connection status interface failed: {e}")
@@ -206,25 +206,25 @@ async def test_connector_compatibility():
# Test initialization
assert connector.exchange_name == name
print(f" Initialization: {connector.exchange_name}")
print(f" Initialization: {connector.exchange_name}")
# Test symbol normalization
btc_symbol = connector.normalize_symbol('BTCUSDT')
eth_symbol = connector.normalize_symbol('ETHUSDT')
print(f" Symbol normalization: BTCUSDT -> {btc_symbol}, ETHUSDT -> {eth_symbol}")
print(f" Symbol normalization: BTCUSDT -> {btc_symbol}, ETHUSDT -> {eth_symbol}")
# Test message type detection
test_msg = {'type': 'test'} if name != 'kraken' else [1, {}, 'test', 'symbol']
msg_type = connector._get_message_type(test_msg)
print(f" Message type detection: {msg_type}")
print(f" Message type detection: {msg_type}")
# Test statistics
stats = connector.get_stats()
print(f" Statistics: {len(stats)} fields")
print(f" Statistics: {len(stats)} fields")
# Test connection status
status = connector.get_connection_status()
print(f" Connection status: {status.value}")
print(f" Connection status: {status.value}")
print(f" {name.upper()} connector passed all tests")
@@ -265,7 +265,7 @@ async def test_multi_connector_data_flow():
try:
await connector.subscribe_orderbook(symbol)
await connector.subscribe_trades(symbol)
print(f"Subscribed to {symbol} on {name}")
print(f"Subscribed to {symbol} on {name}")
except Exception as e:
print(f"✗ Failed to subscribe to {symbol} on {name}: {e}")

View File

@@ -306,7 +306,7 @@ async def test_bybit_integration():
test_message = {'topic': 'orderbook.50.BTCUSDT', 'data': {}}
assert connector._get_message_type(test_message) == 'orderbook'
print("Bybit connector integration test passed")
print("Bybit connector integration test passed")
return True
except Exception as e:

View File

@@ -349,7 +349,7 @@ async def test_coinbase_integration():
test_message = {'type': 'l2update', 'product_id': 'BTC-USD'}
assert connector._get_message_type(test_message) == 'l2update'
print("Coinbase connector integration test passed")
print("Coinbase connector integration test passed")
return True
except Exception as e:

View File

@@ -383,7 +383,7 @@ async def test_kraken_integration():
status_message = {'event': 'systemStatus', 'status': 'online'}
assert connector._get_message_type(status_message) == 'systemStatus'
print("Kraken connector integration test passed")
print("Kraken connector integration test passed")
return True
except Exception as e:

View File

@@ -344,7 +344,7 @@ async def test_integration_suite():
price = adapter.get_current_price('BTCUSDT')
assert price == 50000.0
logger.info(f"Current price retrieval: {price}")
logger.info(f"Current price retrieval: {price}")
# Test subscription
callback_called = False
@@ -355,17 +355,17 @@ async def test_integration_suite():
subscriber_id = adapter.subscribe_to_ticks(test_callback, ['BTCUSDT'])
assert subscriber_id != ""
logger.info(f"Subscription created: {subscriber_id}")
logger.info(f"Subscription created: {subscriber_id}")
# Test data quality
quality = adapter.get_data_quality_indicators('BTCUSDT')
assert quality['symbol'] == 'BTCUSDT'
logger.info(f"Data quality check: {quality['quality_score']}")
logger.info(f"Data quality check: {quality['quality_score']}")
# Test system metadata
metadata = adapter.get_system_metadata()
assert metadata['system'] == 'COBY'
logger.info(f"System metadata: {metadata['mode']}")
logger.info(f"System metadata: {metadata['mode']}")
logger.info("All integration tests passed successfully!")
return True
@@ -379,7 +379,7 @@ if __name__ == "__main__":
# Run the integration tests
success = asyncio.run(test_integration_suite())
if success:
print("COBY orchestrator integration tests completed successfully")
print("COBY orchestrator integration tests completed successfully")
else:
print("✗ COBY orchestrator integration tests failed")
exit(1)