aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tests/test_staticdirect.py
blob: 3a9e2fd9687220ef45978932802cf1fb2f857caf (plain)
1
2
3
4
5
6
7
8
9
from mediagoblin.tools import staticdirect

def test_staticdirect():
    sdirect = staticdirect.StaticDirect(
      {None: "/static/",
       "theme": "http://example.org/themestatic"})
    assert sdirect("css/monkeys.css") == "/static/css/monkeys.css"
    assert sdirect("images/lollerskate.png", "theme") == \
        "http://example.org/themestatic/images/lollerskate.png"