From 4479bdceab4d1740ad6f4e9853f9881c6d43b106 Mon Sep 17 00:00:00 2001 From: Yuhong Sun Date: Sun, 27 Oct 2024 22:55:35 -0700 Subject: [PATCH] Backport Test 7 (#2971) --- .../tests/unit/danswer/connectors/mediawiki/test_wiki.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/tests/unit/danswer/connectors/mediawiki/test_wiki.py b/backend/tests/unit/danswer/connectors/mediawiki/test_wiki.py index 9aaacfc1eae..78601446a66 100644 --- a/backend/tests/unit/danswer/connectors/mediawiki/test_wiki.py +++ b/backend/tests/unit/danswer/connectors/mediawiki/test_wiki.py @@ -9,12 +9,15 @@ from danswer.connectors.mediawiki import wiki +# These tests are disabled for now + @pytest.fixture def site() -> pywikibot.Site: return pywikibot.Site("en", "wikipedia") +@pytest.mark.skip(reason="Test disabled") def test_pywikibot_timestamp_to_utc_datetime() -> None: timestamp_without_tzinfo = pywikibot.Timestamp(2023, 12, 27, 15, 38, 49) timestamp_min_timezone = timestamp_without_tzinfo.astimezone(datetime.timezone.min) @@ -80,6 +83,7 @@ def latest_revision(self) -> pywikibot.page.Revision: ) +@pytest.mark.skip(reason="Test disabled") def test_get_doc_from_page(site: pywikibot.Site) -> None: test_page = MockPage(site, "Test Page", _has_categories=True) doc = wiki.get_doc_from_page(test_page, site, wiki.DocumentSource.MEDIAWIKI) @@ -103,6 +107,7 @@ def test_get_doc_from_page(site: pywikibot.Site) -> None: assert doc.id == f"MEDIAWIKI_{test_page.pageid}_{test_page.full_url()}" +@pytest.mark.skip(reason="Test disabled") def test_mediawiki_connector_recurse_depth() -> None: """Test that the recurse_depth parameter is parsed correctly. @@ -132,6 +137,7 @@ def test_mediawiki_connector_recurse_depth() -> None: assert connector.recurse_depth == recurse_depth +@pytest.mark.skip(reason="Test disabled") def test_load_from_state_calls_poll_source_with_nones(mocker: MockFixture) -> None: connector = wiki.MediaWikiConnector("wikipedia.org", [], [], 0, "test") poll_source = mocker.patch.object(connector, "poll_source")