remove more compat code

This commit is contained in:
David Lord 2020-04-04 09:25:54 -07:00
parent 662c245795
commit 57d628ca74
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
9 changed files with 37 additions and 89 deletions

View file

@ -91,12 +91,7 @@ def test_provide_automatic_options_kwarg(app, client):
assert rv.status_code == 405
assert sorted(rv.allow) == ["GET", "HEAD"]
# Older versions of Werkzeug.test.Client don't have an options method
if hasattr(client, "options"):
rv = client.options("/")
else:
rv = client.open("/", method="OPTIONS")
rv = client.open("/", method="OPTIONS")
assert rv.status_code == 405
rv = client.head("/")
@ -109,11 +104,7 @@ def test_provide_automatic_options_kwarg(app, client):
assert rv.status_code == 405
assert sorted(rv.allow) == ["GET", "HEAD", "POST"]
if hasattr(client, "options"):
rv = client.options("/more")
else:
rv = client.open("/more", method="OPTIONS")
rv = client.open("/more", method="OPTIONS")
assert rv.status_code == 405