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

Function test_no_setup_after_first_request

tests/test_basic.py:1671–1683  ·  view source on GitHub ↗
(app, client)

Source from the content-addressed store, hash-verified

1669
1670
1671def test_no_setup_after_first_request(app, client):
1672 app.debug = True
1673
1674 @app.route("/")
1675 def index():
1676 return "Awesome"
1677
1678 assert client.get("/").data == b"Awesome"
1679
1680 with pytest.raises(AssertionError) as exc_info:
1681 app.add_url_rule("/foo", endpoint="late")
1682
1683 assert "setup method 'add_url_rule'" in str(exc_info.value)
1684
1685
1686def test_routing_redirect_debugging(monkeypatch, app, client):

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
add_url_ruleMethod · 0.45

Tested by

no test coverage detected