@@ -108,22 +108,34 @@ def test_pathname_prefix_assets(empty_environ, req, expected):
108108@pytest .mark .parametrize (
109109 "requests_pathname_prefix, assets_external_path, assets_url_path, expected" ,
110110 [
111- (None , None , "assets" , "/assets/reset.css" ),
112- ("/app/" , None , "assets" , '/app/assets/reset.css' ),
113- (None , None , "css" , "/css/reset.css" ),
114- ("/app/" , None , "css" , "/app/css/reset.css" ),
115- (None , "http://external.com/" , "assets" , "http://external.com/assets/reset.css" ),
116- ("/app/" , "http://external.com/" , "css" , "http://external.com/css/reset.css" ),
117-
118- ],)
119- def test_asset_url (empty_environ , requests_pathname_prefix , assets_external_path , assets_url_path , expected ):
120- app = Dash ('Dash' ,
121- requests_pathname_prefix = requests_pathname_prefix ,
122- assets_external_path = assets_external_path ,
123- assets_url_path = assets_url_path
124- )
125-
126- path = app .get_asset_url ('reset.css' )
111+ (None , None , "assets" , "/assets/reset.css" ),
112+ ("/app/" , None , "assets" , "/app/assets/reset.css" ),
113+ (None , None , "css" , "/css/reset.css" ),
114+ ("/app/" , None , "css" , "/app/css/reset.css" ),
115+ (
116+ None ,
117+ "http://external.com/" ,
118+ "assets" ,
119+ "http://external.com/assets/reset.css" ,
120+ ),
121+ ("/app/" , "http://external.com/" , "css" , "http://external.com/css/reset.css" ),
122+ ],
123+ )
124+ def test_asset_url (
125+ empty_environ ,
126+ requests_pathname_prefix ,
127+ assets_external_path ,
128+ assets_url_path ,
129+ expected ,
130+ ):
131+ app = Dash (
132+ "Dash" ,
133+ requests_pathname_prefix = requests_pathname_prefix ,
134+ assets_external_path = assets_external_path ,
135+ assets_url_path = assets_url_path ,
136+ )
137+
138+ path = app .get_asset_url ("reset.css" )
127139 assert path == expected
128140
129141
0 commit comments