MCPcopy Create free account
hub / github.com/pallets/flask / test_subdomain_matching

Function test_subdomain_matching

tests/test_basic.py:1767–1777  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1765
1766
1767def test_subdomain_matching():
1768 app = flask.Flask(__name__, subdomain_matching=True)
1769 client = app.test_client()
1770 app.config["SERVER_NAME"] = "localhost.localdomain"
1771
1772 @app.route("/", subdomain="<user>")
1773 def index(user):
1774 return f"index for {user}"
1775
1776 rv = client.get("/", "http://mitsuhiko.localhost.localdomain/")
1777 assert rv.data == b"index for mitsuhiko"
1778
1779
1780def test_subdomain_matching_with_ports():

Callers

nothing calls this directly

Calls 2

test_clientMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected