Skip to content

Commit

Permalink
Fix bs4 deprecation warning
Browse files Browse the repository at this point in the history
> DeprecationWarning: The 'text' argument to find()-type methods is
> deprecated. Use 'string' instead.

The 'string' argument was added in bs4 4.4.0, so it will work for all
allowed bs4 versions in MechanicalSoup (4.7+). The 'text' argument was
deprecated in bs4 4.11.0.
  • Loading branch information
hemberger committed Jul 3, 2022
1 parent 0da34e2 commit 8d09fd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_stateful_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ def test_referer_submit_headers(httpbin):

@pytest.mark.parametrize('expected, kwargs', [
pytest.param('/foo', {}, id='none'),
pytest.param('/get', {'text': 'Link'}, id='text'),
pytest.param('/get', {'string': 'Link'}, id='string'),
pytest.param('/get', {'url_regex': 'get'}, id='regex'),
])
def test_follow_link_arg(httpbin, expected, kwargs):
Expand Down

0 comments on commit 8d09fd2

Please sign in to comment.