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

Function test_no_setup_after_first_request

tests/test_basic.py:1699–1711  ·  tests/test_basic.py::test_no_setup_after_first_request
(app, client)

Source from the content-addressed store, hash-verified

1697
1698
1699def test_no_setup_after_first_request(app, client):
1700 app.debug = True
1701
1702 @app.route(class="st">"/")
1703 def index():
1704 return class="st">"Awesome"
1705
1706 assert client.get(class="st">"/").data == bclass="st">"Awesome"
1707
1708 with pytest.raises(AssertionError) as exc_info:
1709 app.add_url_rule(class="st">"/foo", endpoint=class="st">"late")
1710
1711 assert class="st">"setup method &class="cm">#x27;add_url_rule'" in str(exc_info.value)
1712
1713
1714def 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