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

Class View

tests/test_basic.py:1858–1864  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1856
1857def test_multi_route_class_views(app, client):
1858 class View:
1859 def __init__(self, app):
1860 app.add_url_rule("/", "index", self.index)
1861 app.add_url_rule("/<test>/", "index", self.index)
1862
1863 def index(self, test="a"):
1864 return test
1865
1866 _ = View(app)
1867 rv = client.open("/")

Callers 1

Calls

no outgoing calls

Tested by 1