Beispiel #1
0
    def test_pathname_prefix_assets(self):
        req = '/'
        path = get_asset_path(req, 'reset.css', 'assets')
        self.assertEqual('/assets/reset.css', path)

        req = '/requests/'
        path = get_asset_path(req, 'reset.css', 'assets')
        self.assertEqual('/requests/assets/reset.css', path)

        req = '/requests/routes/'
        path = get_asset_path(req, 'reset.css', 'assets')
        self.assertEqual('/requests/routes/assets/reset.css', path)
Beispiel #2
0
def test_pathname_prefix_assets(empty_environ, req, expected):
    path = get_asset_path(req, "reset.css", "assets")
    assert path == expected