diff options
| author | Cody Logan <cody@lokken.dev> | 2023-11-01 13:11:35 -0700 |
|---|---|---|
| committer | Cody Logan <cody@lokken.dev> | 2023-11-01 13:11:35 -0700 |
| commit | bf7d8c97620471fed7e9276462984b1f33b512d0 (patch) | |
| tree | 006e0a99b4e9c06028e9192cf6da33a68b59329f /tests/test_client.py | |
| parent | 235b3e6a723e3e18962212c7d2c0f19619c2fa6f (diff) | |
| download | wikiget-bf7d8c97620471fed7e9276462984b1f33b512d0.tar.gz wikiget-bf7d8c97620471fed7e9276462984b1f33b512d0.zip | |
Condense parser construction logic
Diffstat (limited to 'tests/test_client.py')
| -rw-r--r-- | tests/test_client.py | 4 |
1 files changed, 2 insertions, 2 deletions
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 |
