From 08a5907bd8b34e2f99a0c74e6756c66134ceb7d3 Mon Sep 17 00:00:00 2001 From: Cody Logan Date: Fri, 3 Nov 2023 10:40:07 -0700 Subject: Move from unittest.mock to pytest's monkeypatch where feasible --- tests/test_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/test_client.py') diff --git a/tests/test_client.py b/tests/test_client.py index 9b1b8a4..c34a842 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -25,7 +25,6 @@ from wikiget.client import connect_to_site, query_api from wikiget.wikiget import parse_args -# TODO: don't hit the actual API when doing tests class TestQueryApi: @patch("mwclient.Site.__new__") def test_connect_to_site( @@ -42,6 +41,7 @@ class TestQueryApi: assert mock_site.called assert "Connecting to commons.wikimedia.org" in caplog.text + # TODO: don't hit the actual API when doing tests @pytest.mark.skip(reason="skip tests that query a live API") def test_query_api(self, caplog: pytest.LogCaptureFixture) -> None: """ -- cgit v1.2.3