diff --git a/src/app/markets/yfinance.py b/src/app/markets/yfinance.py index 1b54e0a..acfacb8 100644 --- a/src/app/markets/yfinance.py +++ b/src/app/markets/yfinance.py @@ -12,7 +12,7 @@ def create_product_info(stock_data: dict[str, str]) -> ProductInfo: product.symbol = product.id.split('-')[0] # Rimuovi il suffisso della valuta per le crypto product.price = float(stock_data.get('Current Stock Price', f"0.0 USD").split(" ")[0]) # prende solo il numero product.volume_24h = 0.0 # YFinance non fornisce il volume 24h direttamente - product.quote_currency = product.id.split('-')[0] # La valuta è la parte dopo il '-' + product.quote_currency = product.id.split('-')[1] # La valuta è la parte dopo il '-' return product def create_price_from_history(hist_data: dict[str, str]) -> Price: diff --git a/tests/tools/test_news_tool.py b/tests/tools/test_news_tool.py index cb820ba..5a57f82 100644 --- a/tests/tools/test_news_tool.py +++ b/tests/tools/test_news_tool.py @@ -33,10 +33,8 @@ class TestNewsAPITool: result = tool.wrapper_handler.try_call_all(lambda w: w.get_top_headlines(limit=2)) assert isinstance(result, dict) assert len(result.keys()) > 0 - print("Results from providers:", result.keys()) for provider, articles in result.items(): for article in articles: - print(provider, article.title) assert article.title is not None assert article.source is not None @@ -45,9 +43,7 @@ class TestNewsAPITool: result = tool.wrapper_handler.try_call_all(lambda w: w.get_latest_news(query="crypto", limit=2)) assert isinstance(result, dict) assert len(result.keys()) > 0 - print("Results from providers:", result.keys()) for provider, articles in result.items(): for article in articles: - print(provider, article.title) assert article.title is not None assert article.source is not None diff --git a/tests/tools/test_socials_tool.py b/tests/tools/test_socials_tool.py index 9c66afa..d08ed0f 100644 --- a/tests/tools/test_socials_tool.py +++ b/tests/tools/test_socials_tool.py @@ -24,9 +24,7 @@ class TestSocialAPIsTool: result = tool.wrapper_handler.try_call_all(lambda w: w.get_top_crypto_posts(limit=2)) assert isinstance(result, dict) assert len(result.keys()) > 0 - print("Results from providers:", result.keys()) for provider, posts in result.items(): for post in posts: - print(provider, post.title) assert post.title is not None assert post.time is not None diff --git a/tests/utils/test_market_aggregator.py b/tests/utils/test_market_aggregator.py index 4f5611c..d7881ef 100644 --- a/tests/utils/test_market_aggregator.py +++ b/tests/utils/test_market_aggregator.py @@ -34,7 +34,6 @@ class TestMarketDataAggregator: } aggregated = aggregate_product_info(products) - print(aggregated) assert len(aggregated) == 1 info = aggregated[0]