From bf7d8c97620471fed7e9276462984b1f33b512d0 Mon Sep 17 00:00:00 2001 From: Cody Logan Date: Wed, 1 Nov 2023 13:11:35 -0700 Subject: Condense parser construction logic --- tests/test_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/test_client.py') diff --git a/tests/test_client.py b/tests/test_client.py index cf6e29c..650c2cf 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -37,7 +37,7 @@ class TestQueryApi: """ caplog.set_level(logging.DEBUG) mock_site.return_value = MagicMock() - args = construct_parser().parse_args(["File:Example.jpg"]) + args = construct_parser(["File:Example.jpg"]) _ = connect_to_site("commons.wikimedia.org", args) assert mock_site.called assert "Connecting to commons.wikimedia.org" in caplog.text @@ -49,7 +49,7 @@ class TestQueryApi: agent we're sending to the API. """ caplog.set_level(logging.DEBUG) - args = construct_parser().parse_args(["File:Example.jpg"]) + args = construct_parser(["File:Example.jpg"]) site = connect_to_site("commons.wikimedia.org", args) _ = query_api("Example.jpg", site) assert USER_AGENT in caplog.text -- cgit v1.2.3