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

Class View

tests/test_basic.py:1830–1836  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1828
1829def test_multi_route_class_views(app, client):
1830 class View:
1831 def __init__(self, app):
1832 app.add_url_rule("/", "index", self.index)
1833 app.add_url_rule("/<test>/", "index", self.index)
1834
1835 def index(self, test="a"):
1836 return test
1837
1838 _ = View(app)
1839 rv = client.open("/")

Callers 1

Calls

no outgoing calls

Tested by 1