From c1952526add6434751961d830281c602b3835ad1 Mon Sep 17 00:00:00 2001 From: Berack96 Date: Tue, 30 Sep 2025 12:54:19 +0200 Subject: [PATCH] Fix class and test method names for DuckDuckGoWrapper --- src/app/news/__init__.py | 2 +- tests/api/test_duckduckgo_news.py | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/app/news/__init__.py b/src/app/news/__init__.py index 3218296..d38cd43 100644 --- a/src/app/news/__init__.py +++ b/src/app/news/__init__.py @@ -13,7 +13,7 @@ class NewsAPIs(NewsWrapper): A wrapper class that aggregates multiple news API wrappers and tries them in order until one succeeds. This class uses the WrapperHandler to manage multiple NewsWrapper instances. It includes, and tries, the following news API wrappers in this order: - - GnewsWrapper + - GoogleNewsWrapper - DuckDuckGoWrapper - NewsApiWrapper - CryptoPanicWrapper diff --git a/tests/api/test_duckduckgo_news.py b/tests/api/test_duckduckgo_news.py index ea38272..e0bb599 100644 --- a/tests/api/test_duckduckgo_news.py +++ b/tests/api/test_duckduckgo_news.py @@ -6,11 +6,11 @@ from app.news import DuckDuckGoWrapper @pytest.mark.api class TestDuckDuckGoNews: - def test_news_api_initialization(self): + def test_duckduckgo_initialization(self): news = DuckDuckGoWrapper() assert news.tool is not None - def test_news_api_get_latest_news(self): + def test_duckduckgo_get_latest_news(self): news = DuckDuckGoWrapper() articles = news.get_latest_news(query="crypto", total=2) assert isinstance(articles, list) @@ -21,8 +21,7 @@ class TestDuckDuckGoNews: assert article.title is not None or article.title != "" assert article.description is not None or article.description != "" - - def test_news_api_get_top_headlines(self): + def test_duckduckgo_get_top_headlines(self): news = DuckDuckGoWrapper() articles = news.get_top_headlines(total=2) assert isinstance(articles, list)