Final review

- rm PublicBinanceAgent & updated demo
- moved in the correct folder some tests
- fix binance bug
This commit is contained in:
Giacomo Bertolazzi
2025-10-01 13:50:19 +00:00
parent 31057007fb
commit 66d2838df3
8 changed files with 47 additions and 250 deletions

View File

@@ -23,6 +23,7 @@ def pytest_configure(config:pytest.Config):
("social", "marks tests that use social media"),
("limited", "marks tests that have limited execution due to API constraints"),
("wrapper", "marks tests for wrapper handler"),
("tools", "marks tests for tools"),
]
for marker in markers:
line = f"{marker[0]}: {marker[1]}"

View File

@@ -4,6 +4,8 @@ from app.agents.market_agent import MarketToolkit
from app.markets import MarketAPIsTool
@pytest.mark.limited # usa molte api calls e non voglio esaurire le chiavi api
@pytest.mark.tools
@pytest.mark.api
class TestMarketAPIsTool:
def test_wrapper_initialization(self):
market_wrapper = MarketAPIsTool("USD")

View File

@@ -1,10 +1,12 @@
import pytest
from app.utils.market_data_aggregator import MarketDataAggregator
from app.utils.aggregated_models import AggregatedProductInfo
from app.markets.base import ProductInfo, Price
@pytest.mark.limited
@pytest.mark.market
@pytest.mark.api
class TestMarketDataAggregator:
def test_initialization(self):
@@ -84,7 +86,3 @@ class TestMarketDataAggregator:
assert len(aggregated._metadata.sources_used) > 0
assert aggregated._metadata.aggregation_timestamp != ""
# La confidence può essere 0.0 se ci sono fonti "unknown"
if __name__ == "__main__":
pytest.main([__file__])