MCPcopy
hub / github.com/pallets/flask / test_subdomain

Method test_subdomain

tests/test_cli.py:502–509  ·  view source on GitHub ↗
(self, runner)

Source from the content-addressed store, hash-verified

500 assert "No routes were registered." in result.output
501
502 def test_subdomain(self, runner):
503 app = Flask(__name__, static_folder=None)
504 app.add_url_rule("/a", subdomain="a", endpoint="a")
505 app.add_url_rule("/b", subdomain="b", endpoint="b")
506 cli = FlaskGroup(create_app=lambda: app)
507 result = runner.invoke(cli, ["routes"])
508 assert result.exit_code == 0
509 assert "Subdomain" in result.output
510
511 def test_host(self, runner):
512 app = Flask(__name__, static_folder=None, host_matching=True)

Callers

nothing calls this directly

Calls 4

FlaskClass · 0.90
FlaskGroupClass · 0.90
add_url_ruleMethod · 0.45
invokeMethod · 0.45

Tested by

no test coverage detected