Merge branch '2.0.x'
This commit is contained in:
commit
e37e87140e
23 changed files with 221 additions and 180 deletions
|
|
@ -2,6 +2,7 @@ import gc
|
|||
import re
|
||||
import time
|
||||
import uuid
|
||||
import warnings
|
||||
import weakref
|
||||
from datetime import datetime
|
||||
from platform import python_implementation
|
||||
|
|
@ -1525,8 +1526,11 @@ def test_server_name_subdomain():
|
|||
rv = client.get("/", "https://dev.local")
|
||||
assert rv.data == b"default"
|
||||
|
||||
# suppress Werkzeug 1.0 warning about name mismatch
|
||||
with pytest.warns(None):
|
||||
# suppress Werkzeug 0.15 warning about name mismatch
|
||||
with warnings.catch_warnings():
|
||||
warnings.filterwarnings(
|
||||
"ignore", "Current server name", UserWarning, "flask.app"
|
||||
)
|
||||
rv = client.get("/", "http://foo.localhost")
|
||||
assert rv.status_code == 404
|
||||
|
||||
|
|
@ -1893,7 +1897,10 @@ def test_subdomain_matching_other_name(matching):
|
|||
return "", 204
|
||||
|
||||
# suppress Werkzeug 0.15 warning about name mismatch
|
||||
with pytest.warns(None):
|
||||
with warnings.catch_warnings():
|
||||
warnings.filterwarnings(
|
||||
"ignore", "Current server name", UserWarning, "flask.app"
|
||||
)
|
||||
# ip address can't match name
|
||||
rv = client.get("/", "http://127.0.0.1:3000/")
|
||||
assert rv.status_code == 404 if matching else 204
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue