()
| 1765 | |
| 1766 | |
| 1767 | def 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 | |
| 1780 | def test_subdomain_matching_with_ports(): |
nothing calls this directly
no test coverage detected