@@ -19,7 +19,7 @@ def test_add_view(lt_extension, app, view_cls):
1919
2020 assert "index" in lt_extension .views
2121 assert lt_extension .views .get ("index" ) == {
22- "rule " : "/org.labthings.tests.extension/index" ,
22+ "urls " : [ "/org.labthings.tests.extension/index" ] ,
2323 "view" : view_cls ,
2424 "kwargs" : {},
2525 }
@@ -98,35 +98,7 @@ def f():
9898 )
9999
100100
101- def test_static_file_url (lt_extension , app , app_ctx ):
102- endpoint = "extensionstatic"
103- static_view = lt_extension .views .get ("static" ).get ("view" )
104- static_view .endpoint = endpoint
105- static_rule = lt_extension .views .get ("static" ).get ("rule" )
106-
107- assert static_view
108- assert static_rule
109-
110- app .add_url_rule (static_rule , view_func = static_view .as_view (endpoint ))
111-
112- with app_ctx .test_request_context ():
113- assert (
114- "org.labthings.tests.extension/static/filename"
115- in lt_extension .static_file_url ("filename" )
116- )
117-
118-
119- def test_static_file_url_no_endpoint (lt_extension , app , app_ctx ):
120- static_view = lt_extension .views .get ("static" ).get ("view" )
121- static_rule = lt_extension .views .get ("static" ).get ("rule" )
122-
123- assert static_view
124- assert static_rule
125-
126- app .add_url_rule (static_rule , view_func = static_view .as_view ("index" ))
127-
128- with app_ctx .test_request_context ():
129- assert lt_extension .static_file_url ("filename" ) is None
101+ # TODO: Rewrite static file tests to attach the extension to a Thing instance
130102
131103
132104def test_find_instances_in_module (lt_extension ):
0 commit comments