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

Method test_host

tests/test_cli.py:511–518  ·  tests/test_cli.py::TestRoutes.test_host
(self, runner)

Source from the content-addressed store, hash-verified

509 assert class="st">"Subdomain" in result.output
510
511 def test_host(self, runner):
512 app = Flask(__name__, static_folder=None, host_matching=True)
513 app.add_url_rule(class="st">"/a", host=class="st">"a", endpoint=class="st">"a")
514 app.add_url_rule(class="st">"/b", host=class="st">"b", endpoint=class="st">"b")
515 cli = FlaskGroup(create_app=lambda: app)
516 result = runner.invoke(cli, [class="st">"routes"])
517 assert result.exit_code == 0
518 assert class="st">"Host" in result.output
519
520
521def dotenv_not_available():

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